/* * gpe-conf * * Copyright (C) 2005 Florian Boor * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. * * GPE keys, keyboard and button module. * */ #include #include #include #include #include #include #include #define _(x) gettext(x) #include #include #include #include #include "keys.h" #include "../applets.h" #include "keyboard.h" #include "keyctl.h" #include "kbd.h" /* --- local types and constants --- */ /* --- module global variables --- */ /* --- local intelligence --- */ /* --- gpe-conf interface --- */ void Keys_Free_Objects () { } void Keys_Save () { const char *model, *port; char *str; keyboard_get_config(&model, &port); str = g_strdup_printf("%s %s", model, port); suid_exec("KBDD", str); g_free(str); Kbd_Save (); Keyctl_Save (); } void Keys_Restore () { } GtkWidget * Keys_Build_Objects (void) { GtkWidget *label, *page; GtkWidget *notebook; notebook = gtk_notebook_new(); page = Keyctl_Build_Objects(); label = gtk_label_new(_("Buttons")); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), page, label); page = Kbd_Build_Objects(); label = gtk_label_new(_("Virtual Keyb.")); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), page, label); page = Keyboard_Build_Objects(); label = gtk_label_new(_("External Keyb.")); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), page, label); return notebook; }