Commit bb3a0246 authored by Stephen Browne's avatar Stephen Browne

Added Configuration of Menu and Run key bindings.

parent 7c6fa79b
2001-12-12 Stephen Browne <stephen.browne@sun.com>
* Makefile.am, gnome-panel-properties.c,
gnome-panel-properties.glade, gnome-panel-properties.glade.h
Added LDFLAGS for gnome-panel-properties.
Added support for configuring keybindings
2001-12-12 Glynn Foster <glynn.foster@sun.com> 2001-12-12 Glynn Foster <glynn.foster@sun.com>
* Makefile.am, main.c, panel-gconf.c, * Makefile.am, main.c, panel-gconf.c,
......
...@@ -145,10 +145,12 @@ gnome_panel_2_LDADD = \ ...@@ -145,10 +145,12 @@ gnome_panel_2_LDADD = \
gnome_panel_2_LDFLAGS = -export-dynamic gnome_panel_2_LDFLAGS = -export-dynamic
gnome_panel_properties_SOURCES = gnome-panel-properties.c gnome_panel_properties_SOURCES = gnome-panel-properties.c panel-util.c
gnome_panel_properties_LDADD = $(PANELCONFIG_LIBS) gnome_panel_properties_LDADD = $(PANELCONFIG_LIBS)
gnome_panel_properties_LDFLAGS = -export-dynamic
EXTRA_DIST = \ EXTRA_DIST = \
APPLET_WRITING \ APPLET_WRITING \
GNOME_Panel.server.in \ GNOME_Panel.server.in \
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <gdk/gdkx.h> #include <gdk/gdkx.h>
#include "global-keys.h" #include "global-keys.h"
#include "panel-util.h"
#include <libart_lgpl/art_misc.h> #include <libart_lgpl/art_misc.h>
#include <libart_lgpl/art_affine.h> #include <libart_lgpl/art_affine.h>
...@@ -40,21 +41,12 @@ ...@@ -40,21 +41,12 @@
#include <gconf/gconf-client.h> #include <gconf/gconf-client.h>
/*This array is the names of the checkboxes in the gnome-panel-properties.glade /* Just so we can link with panel-util.c for the convert keys stuff*/
file. The names also correspond directly to the gconf-keys which they GSList *applets;
represent. If you add a new checkbox to the interface make sure its name is
the same as the gconf-key it is to edit and make sure you add its name to /* Ugly globals to help reduce code size */
this array.*/ GladeXML *glade_gui;
GConfClient *gconf_client;
gchar* checkboxes[] = {
"drawer-autoclose",
"auto-raise-panel",
"confirm-panel-remove",
"avoid-panel-overlap",
"keep-menus-in-memory",
"enable-animations",
NULL
};
/* /*
* GEGL Wants Winners, * GEGL Wants Winners,
...@@ -90,9 +82,8 @@ void transform_pixbuf(guchar *dst, int x0, int y0, int x1, int y1, int drs, ...@@ -90,9 +82,8 @@ void transform_pixbuf(guchar *dst, int x0, int y0, int x1, int y1, int drs,
} }
} }
#include "nothing.cP" #include "nothing.cP"
/*
static GtkWidget *grab_dialog; static GtkWidget *grab_dialog;
static gboolean static gboolean
...@@ -121,7 +112,6 @@ is_modifier (guint keycode) ...@@ -121,7 +112,6 @@ is_modifier (guint keycode)
return retval; return retval;
} }
static GdkFilterReturn static GdkFilterReturn
grab_key_filter (GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data) grab_key_filter (GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data)
{ {
...@@ -189,137 +179,184 @@ grab_button_pressed (GtkButton *button, gpointer data) ...@@ -189,137 +179,184 @@ grab_button_pressed (GtkButton *button, gpointer data)
gtk_widget_show_all (grab_dialog); gtk_widget_show_all (grab_dialog);
return; return;
} }
*/
static void static void
checkbox_clicked (GtkWidget *widget, gpointer data) update_sensitive_for_checkbox(gchar *key, int checked)
{ {
gchar *key = (gchar*)data; GtkWidget *associate = NULL;
gconf_client_set_bool(gconf_client_get_default(),key, if (strcmp(key,"/apps/panel/global/enable-animations") == 0)
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)),NULL); associate = glade_xml_get_widget(glade_gui,"animation-vbox");
if (strcmp(key,"/apps/panel/global/enable-key-bindings") == 0)
associate = glade_xml_get_widget(glade_gui,"kb-table");
if (associate !=NULL)
gtk_widget_set_sensitive(associate,checked);
} }
static void static void
enable_animations_clicked (GtkWidget *widget, gpointer data) checkbox_clicked (GtkWidget *widget, gpointer data)
{ {
GtkWidget *vbox = GTK_WIDGET(data); int checked = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
int enable = GTK_TOGGLE_BUTTON(widget)->active; gchar *key = (gchar*)data;
gtk_widget_set_sensitive(vbox,enable); gconf_client_set_bool(gconf_client,key,checked,NULL);
update_sensitive_for_checkbox(key, checked);
} }
static void static void
animation_speed_changed (GtkWidget *widget, gpointer data) option_menu_changed (GtkWidget *widget, gpointer data)
{ {
gconf_client_set_int(gconf_client_get_default(), gchar *key = (gchar *)data;
"/apps/panel/global/panel-animation-speed",
gconf_client_set_int(gconf_client,key,
gtk_option_menu_get_history(GTK_OPTION_MENU(widget)),NULL); gtk_option_menu_get_history(GTK_OPTION_MENU(widget)),NULL);
} }
static void static void
hide_delay_changed (GtkWidget *widget, gpointer data) spin_button_changed (GtkWidget *widget, gpointer data)
{ {
gconf_client_set_int(gconf_client_get_default(), gchar *key = (gchar *)data;
"/apps/panel/global/panel-hide-delay",
gconf_client_set_int(gconf_client,key,
gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)),NULL); gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)),NULL);
} }
static void static void
show_delay_changed (GtkWidget *widget, gpointer data) entry_changed (GtkWidget *widget, gpointer data)
{ {
gconf_client_set_int(gconf_client_get_default(), gchar *key = (gchar *)data;
"/apps/panel/global/panel-show-delay",
gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)),NULL); gconf_client_set_string(gconf_client,key,
gtk_entry_get_text(GTK_ENTRY(widget)),NULL);
} }
static void static void
load_booleans_for_checkboxes(GladeXML *gui, GConfClient *client) load_checkboxes()
{ {
GtkWidget *checkbox; gchar* checkboxes[] = {"drawer-autoclose", "auto-raise-panel",
GtkWidget *anim_vbox; "confirm-panel-remove", "avoid-panel-overlap",
gchar *key; "keep-menus-in-memory", "enable-animations",
int i=0; "enable-key-bindings", NULL };
int i = 0;
while(checkboxes[i]!=NULL){ while(checkboxes[i]!=NULL){
checkbox= glade_xml_get_widget(gui,checkboxes[i]); GtkWidget *checkbox;
gchar *key;
int checked;
checkbox= glade_xml_get_widget(glade_gui,checkboxes[i]);
key = g_strdup_printf("/apps/panel/global/%s",checkboxes[i]); key = g_strdup_printf("/apps/panel/global/%s",checkboxes[i]);
checked = gconf_client_get_bool(gconf_client,key,NULL);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbox), gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbox),
gconf_client_get_bool(client,key,NULL)); checked);
g_signal_connect(G_OBJECT(checkbox),"clicked", g_signal_connect(G_OBJECT(checkbox),"clicked",
G_CALLBACK(checkbox_clicked),key); G_CALLBACK(checkbox_clicked), key);
update_sensitive_for_checkbox(key, checked);
i++; i++;
/*g_free(key);*/
} }
/*if (key) {
g_free(key);
key = NULL;
}*/
checkbox = glade_xml_get_widget(gui,"enable-animations");
anim_vbox = glade_xml_get_widget(gui,"animation-vbox");
gtk_widget_set_sensitive(anim_vbox,
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbox)));
g_signal_connect(G_OBJECT(checkbox),"clicked",
G_CALLBACK(enable_animations_clicked),anim_vbox);
} }
static void static void
load_config_into_gui(GladeXML *gui, GConfClient *client) load_option_menus()
{ {
gchar *optionmenus[] = {"panel-animation-speed", "panel-window-layer",
GtkWidget *option, *hide_delay, *show_delay; NULL };
int i = 0;
load_booleans_for_checkboxes(gui,client);
while(optionmenus[i]!=NULL){
/* animation speed selection */ GtkWidget *option;
option = glade_xml_get_widget(gui,"panel-animation-speed"); gchar *key;
gtk_option_menu_set_history(GTK_OPTION_MENU(option),
gconf_client_get_int(client, option = glade_xml_get_widget(glade_gui,optionmenus[i]);
"/apps/panel/global/panel-animation-speed",NULL)); key = g_strdup_printf("/apps/panel/global/%s",optionmenus[i]);
g_signal_connect(G_OBJECT(option),"changed", gtk_option_menu_set_history(GTK_OPTION_MENU(option),
G_CALLBACK(animation_speed_changed),NULL); gconf_client_get_int(gconf_client,key,NULL));
g_signal_connect(G_OBJECT(option),"changed",
/* hide delay */ G_CALLBACK(option_menu_changed),key);
hide_delay = glade_xml_get_widget(gui,"panel-hide-delay"); i++;
gtk_spin_button_configure(GTK_SPIN_BUTTON(hide_delay), /*g_free(key);*/
GTK_ADJUSTMENT(gtk_adjustment_new(30.0,30.0, }
3000.0,10.0,10.0,0.0)),10.0,0);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(hide_delay),
(double)gconf_client_get_int(client,
"/apps/panel/global/panel-hide-delay",NULL));
g_signal_connect(G_OBJECT(hide_delay),"value-changed",
G_CALLBACK(hide_delay_changed),NULL);
/* show delay */
show_delay = glade_xml_get_widget(gui,"panel-show-delay");
gtk_spin_button_configure(GTK_SPIN_BUTTON(show_delay),
GTK_ADJUSTMENT(gtk_adjustment_new(0.0,0.0,
3000.0,10.0,10.0,0.0)),10.0,0);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(show_delay),
(double)gconf_client_get_int(client,
"/apps/panel/global/panel-show-delay",NULL));
g_signal_connect(G_OBJECT(show_delay),"value-changed",
G_CALLBACK(show_delay_changed),NULL);
} }
static void static void
setup_the_ui(GtkWidget *main_window, GConfClient* client) load_spin_buttons()
{
/* keep the spin buttons and their associated adjustment in sync */
gchar *spinbuttons[] = {"panel-hide-delay", "panel-show-delay", NULL };
GtkAdjustment *adjustments[] = {GTK_ADJUSTMENT(gtk_adjustment_new(30.0,
30.0,3000.0,10.0,10.0,0.0)),
GTK_ADJUSTMENT(gtk_adjustment_new(0.0,
0.0, 3000.0,10.0,10.0,0.0))
};
int i = 0;
while(spinbuttons[i]!=NULL){
GtkWidget *spin_button;
gchar* key;
spin_button = glade_xml_get_widget(glade_gui,spinbuttons[i]);
gtk_spin_button_configure(GTK_SPIN_BUTTON(spin_button),
adjustments[i],10.0,0);
key = g_strdup_printf("/apps/panel/global/%s",spinbuttons[i]);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_button),
(double)gconf_client_get_int(gconf_client, key, NULL));
g_signal_connect(G_OBJECT(spin_button),"value-changed",
G_CALLBACK(spin_button_changed), key);
i++;
/*g_free(key);*/
}
}
static void
load_key_bindings()
{
gchar *entries[] = {"menu-key", "run-key", NULL };
int i = 0;
while(entries[i]!=NULL){
GtkWidget *button, *entry;
gchar *button_name, *key;
entry = glade_xml_get_widget(glade_gui,entries[i]);
key = g_strdup_printf("/apps/panel/global/%s",entries[i]);
gtk_entry_set_text(entry, gconf_client_get_string(gconf_client,
key,NULL));
button_name = g_strdup_printf("grab-%s", entries[i]);
button = glade_xml_get_widget(glade_gui, button_name);
g_signal_connect(G_OBJECT(button),"clicked",
G_CALLBACK(grab_button_pressed), entry);
g_signal_connect(G_OBJECT(entry),"changed",
G_CALLBACK(entry_changed),key);
i++;
/*g_free(button_name);*/
}
}
static void
load_config_into_gui()
{
load_checkboxes();
load_option_menus();
load_spin_buttons();
load_key_bindings();
}
static void
setup_the_ui(GtkWidget *main_window)
{ {
GladeXML *gui;
gchar *glade_file; gchar *glade_file;
GtkWidget *notebook; GtkWidget *notebook;
glade_file = GLADEDIR "/gnome-panel-properties.glade2"; glade_file = GLADEDIR "/gnome-panel-properties.glade2";
gui = glade_xml_new(glade_file, "main_notebook",NULL); glade_gui = glade_xml_new(glade_file, "main_notebook",NULL);
if (!gui) { if (!glade_gui) {
g_warning("Error loading `%s'",glade_file); g_warning("Error loading `%s'",glade_file);
return; return;
} }
glade_xml_signal_autoconnect(gui); glade_xml_signal_autoconnect(glade_gui);
notebook=glade_xml_get_widget(gui,"main_notebook"); notebook=glade_xml_get_widget(glade_gui,"main_notebook");
g_signal_connect (G_OBJECT (notebook), "event", g_signal_connect (G_OBJECT (notebook), "event",
G_CALLBACK (config_event), G_CALLBACK (config_event),
...@@ -328,7 +365,7 @@ setup_the_ui(GtkWidget *main_window, GConfClient* client) ...@@ -328,7 +365,7 @@ setup_the_ui(GtkWidget *main_window, GConfClient* client)
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(main_window)->vbox),notebook, gtk_box_pack_start(GTK_BOX(GTK_DIALOG(main_window)->vbox),notebook,
TRUE,TRUE,0); TRUE,TRUE,0);
load_config_into_gui(gui, client); load_config_into_gui();
} }
static void static void
...@@ -347,7 +384,6 @@ int ...@@ -347,7 +384,6 @@ int
main (int argc, char **argv) main (int argc, char **argv)
{ {
GtkWidget *main_window; GtkWidget *main_window;
GConfClient *gconf_client;
bindtextdomain(GETTEXT_PACKAGE, GNOMELOCALEDIR); bindtextdomain(GETTEXT_PACKAGE, GNOMELOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
...@@ -362,8 +398,11 @@ main (int argc, char **argv) ...@@ -362,8 +398,11 @@ main (int argc, char **argv)
gtk_dialog_add_button (GTK_DIALOG(main_window), gtk_dialog_add_button (GTK_DIALOG(main_window),
GTK_STOCK_OK, GTK_RESPONSE_OK); GTK_STOCK_OK, GTK_RESPONSE_OK);
gtk_signal_connect(GTK_OBJECT(main_window), "response", gtk_signal_connect(GTK_OBJECT(main_window), "response",
GTK_SIGNAL_FUNC(main_dialog_response), main_window); GTK_SIGNAL_FUNC(main_dialog_response), main_window);
g_signal_connect(G_OBJECT(main_window), "destroy",
G_CALLBACK(gtk_main_quit),NULL);
gconf_client = gconf_client_get_default(); gconf_client = gconf_client_get_default();
...@@ -385,10 +424,11 @@ main (int argc, char **argv) ...@@ -385,10 +424,11 @@ main (int argc, char **argv)
} }
else else
{ {
setup_the_ui(main_window, gconf_client); setup_the_ui(main_window);
} }
gtk_window_set_title(main_window, _("Panel Global Properties")); gtk_window_set_title(GTK_WINDOW(main_window),
_("Panel Global Properties"));
gtk_widget_show_all(main_window); gtk_widget_show_all(main_window);
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <gdk/gdkx.h> #include <gdk/gdkx.h>
#include "global-keys.h" #include "global-keys.h"
#include "panel-util.h"
#include <libart_lgpl/art_misc.h> #include <libart_lgpl/art_misc.h>
#include <libart_lgpl/art_affine.h> #include <libart_lgpl/art_affine.h>
...@@ -40,21 +41,12 @@ ...@@ -40,21 +41,12 @@
#include <gconf/gconf-client.h> #include <gconf/gconf-client.h>
/*This array is the names of the checkboxes in the gnome-panel-properties.glade /* Just so we can link with panel-util.c for the convert keys stuff*/
file. The names also correspond directly to the gconf-keys which they GSList *applets;
represent. If you add a new checkbox to the interface make sure its name is
the same as the gconf-key it is to edit and make sure you add its name to /* Ugly globals to help reduce code size */
this array.*/ GladeXML *glade_gui;
GConfClient *gconf_client;
gchar* checkboxes[] = {
"drawer-autoclose",
"auto-raise-panel",
"confirm-panel-remove",
"avoid-panel-overlap",
"keep-menus-in-memory",
"enable-animations",
NULL
};
/* /*
* GEGL Wants Winners, * GEGL Wants Winners,
...@@ -90,9 +82,8 @@ void transform_pixbuf(guchar *dst, int x0, int y0, int x1, int y1, int drs, ...@@ -90,9 +82,8 @@ void transform_pixbuf(guchar *dst, int x0, int y0, int x1, int y1, int drs,
} }
} }
#include "nothing.cP" #include "nothing.cP"
/*
static GtkWidget *grab_dialog; static GtkWidget *grab_dialog;
static gboolean static gboolean
...@@ -121,7 +112,6 @@ is_modifier (guint keycode) ...@@ -121,7 +112,6 @@ is_modifier (guint keycode)
return retval; return retval;
} }
static GdkFilterReturn static GdkFilterReturn
grab_key_filter (GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data) grab_key_filter (GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data)
{ {
...@@ -189,137 +179,184 @@ grab_button_pressed (GtkButton *button, gpointer data) ...@@ -189,137 +179,184 @@ grab_button_pressed (GtkButton *button, gpointer data)
gtk_widget_show_all (grab_dialog); gtk_widget_show_all (grab_dialog);
return; return;
} }
*/
static void static void
checkbox_clicked (GtkWidget *widget, gpointer data) update_sensitive_for_checkbox(gchar *key, int checked)
{ {
gchar *key = (gchar*)data; GtkWidget *associate = NULL;
gconf_client_set_bool(gconf_client_get_default(),key, if (strcmp(key,"/apps/panel/global/enable-animations") == 0)
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)),NULL); associate = glade_xml_get_widget(glade_gui,"animation-vbox");
if (strcmp(key,"/apps/panel/global/enable-key-bindings") == 0)
associate = glade_xml_get_widget(glade_gui,"kb-table");
if (associate !=NULL)
gtk_widget_set_sensitive(associate,checked);
} }
static void static void
enable_animations_clicked (GtkWidget *widget, gpointer data) checkbox_clicked (GtkWidget *widget, gpointer data)
{ {
GtkWidget *vbox = GTK_WIDGET(data); int checked = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
int enable = GTK_TOGGLE_BUTTON(widget)->active; gchar *key = (gchar*)data;
gtk_widget_set_sensitive(vbox,enable); gconf_client_set_bool(gconf_client,key,checked,NULL);
update_sensitive_for_checkbox(key, checked);
} }
static void static void
animation_speed_changed (GtkWidget *widget, gpointer data) option_menu_changed (GtkWidget *widget, gpointer data)
{ {
gconf_client_set_int(gconf_client_get_default(), gchar *key = (gchar *)data;
"/apps/panel/global/panel-animation-speed",
gconf_client_set_int(gconf_client,key,
gtk_option_menu_get_history(GTK_OPTION_MENU(widget)),NULL); gtk_option_menu_get_history(GTK_OPTION_MENU(widget)),NULL);
} }
static void static void
hide_delay_changed (GtkWidget *widget, gpointer data) spin_button_changed (GtkWidget *widget, gpointer data)
{ {
gconf_client_set_int(gconf_client_get_default(), gchar *key = (gchar *)data;
"/apps/panel/global/panel-hide-delay",
gconf_client_set_int(gconf_client,key,
gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)),NULL); gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)),NULL);
} }
static void static void
show_delay_changed (GtkWidget *widget, gpointer data) entry_changed (GtkWidget *widget, gpointer data)
{ {
gconf_client_set_int(gconf_client_get_default(), gchar *key = (gchar *)data;
"/apps/panel/global/panel-show-delay",
gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)),NULL); gconf_client_set_string(gconf_client,key,
gtk_entry_get_text(GTK_ENTRY(widget)),NULL);
} }
static void static void
load_booleans_for_checkboxes(GladeXML *gui, GConfClient *client) load_checkboxes()
{ {
GtkWidget *checkbox; gchar* checkboxes[] = {"drawer-autoclose", "auto-raise-panel",
GtkWidget *anim_vbox; "confirm-panel-remove", "avoid-panel-overlap",
gchar *key; "keep-menus-in-memory", "enable-animations",
int i=0; "enable-key-bindings", NULL };
int i = 0;
while(checkboxes[i]!=NULL){ while(checkboxes[i]!=NULL){
checkbox= glade_xml_get_widget(gui,checkboxes[i]); GtkWidget *checkbox;
gchar *key;
int checked;
checkbox= glade_xml_get_widget(glade_gui,checkboxes[i]);
key = g_strdup_printf("/apps/panel/global/%s",checkboxes[i]); key = g_strdup_printf("/apps/panel/global/%s",checkboxes[i]);
checked = gconf_client_get_bool(gconf_client,key,NULL);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbox), gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbox),
gconf_client_get_bool(client,key,NULL)); checked);
g_signal_connect(G_OBJECT(checkbox),"clicked", g_signal_connect(G_OBJECT(checkbox),"clicked",
G_CALLBACK(checkbox_clicked),key); G_CALLBACK(checkbox_clicked), key);
update_sensitive_for_checkbox(key, checked);
i++; i++;
/*g_free(key);*/
} }
/*if (key) {
g_free(key);
key = NULL;
}*/
checkbox = glade_xml_get_widget(gui,"enable-animations");
anim_vbox = glade_xml_get_widget(gui,"animation-vbox");
gtk_widget_set_sensitive(anim_vbox,
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbox)));
g_signal_connect(G_OBJECT(checkbox),"clicked",
G_CALLBACK(enable_animations_clicked),anim_vbox);
} }
static void static void
load_config_into_gui(GladeXML *gui, GConfClient *client) load_option_menus()
{ {
gchar *optionmenus[] = {"panel-animation-speed", "panel-window-layer",
GtkWidget *option, *hide_delay, *show_delay; NULL };
int i = 0;
load_booleans_for_checkboxes(gui,client);
while(optionmenus[i]!=NULL){
/* animation speed selection */ GtkWidget *option;
option = glade_xml_get_widget(gui,"panel-animation-speed"); gchar *key;
gtk_option_menu_set_history(GTK_OPTION_MENU(option),
gconf_client_get_int(client, option = glade_xml_get_widget(glade_gui,optionmenus[i]);
"/apps/panel/global/panel-animation-speed",NULL)); key = g_strdup_printf("/apps/panel/global/%s",optionmenus[i]);
g_signal_connect(G_OBJECT(option),"changed", gtk_option_menu_set_history(GTK_OPTION_MENU(option),
G_CALLBACK(animation_speed_changed),NULL); gconf_client_get_int(gconf_client,key,NULL));
g_signal_connect(G_OBJECT(option),"changed",
/* hide delay */ G_CALLBACK(option_menu_changed),key);
hide_delay = glade_xml_get_widget(gui,"panel-hide-delay"); i++;
gtk_spin_button_configure(GTK_SPIN_BUTTON(hide_delay), /*g_free(key);*/
GTK_ADJUSTMENT(gtk_adjustment_new(30.0,30.0, }
3000.0,10.0,10.0,0.0)),10.0,0);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(hide_delay),
(double)gconf_client_get_int(client,
"/apps/panel/global/panel-hide-delay",NULL));
g_signal_connect(G_OBJECT(hide_delay),"value-changed",
G_CALLBACK(hide_delay_changed),NULL);
/* show delay */
show_delay = glade_xml_get_widget(gui,"panel-show-delay");
gtk_spin_button_configure(GTK_SPIN_BUTTON(show_delay),
GTK_ADJUSTMENT(gtk_adjustment_new(0.0,0.0,