Make the glade file look a little bit better, hide the property widgets
2002-05-10 Seth Nickell <snickell@stanford.edu> * gnome-window-properties.c: (set_wm_change_pending), (state_changed), (create_dialog): * gnome-window-properties.glade: Make the glade file look a little bit better, hide the property widgets when there is a window manager change pending.
This commit is contained in:
parent
ad15ad16c9
commit
0410c11e51
3 changed files with 88 additions and 73 deletions
|
@ -38,6 +38,7 @@ typedef struct {
|
|||
static GtkWidget *capplet;
|
||||
static GtkWidget *wm_widget;
|
||||
static GtkWidget *apply_now_button;
|
||||
static GtkWidget *properties_box;
|
||||
|
||||
static WindowManager *selected_wm = NULL;
|
||||
|
||||
|
@ -191,6 +192,13 @@ wm_widget_add_wm (WindowManager *wm, const char *row_text)
|
|||
gtk_option_menu_set_history (GTK_OPTION_MENU (option_menu), 0);
|
||||
}
|
||||
|
||||
static void
|
||||
set_wm_change_pending (gboolean pending)
|
||||
{
|
||||
gtk_widget_set_sensitive (apply_now_button, pending);
|
||||
gtk_widget_set_sensitive (properties_box, !pending);
|
||||
}
|
||||
|
||||
static void
|
||||
response_cb (GtkDialog *dialog, gint response_id, gpointer data)
|
||||
{
|
||||
|
@ -206,7 +214,7 @@ response_cb (GtkDialog *dialog, gint response_id, gpointer data)
|
|||
static void
|
||||
state_changed (void)
|
||||
{
|
||||
gtk_widget_set_sensitive (apply_now_button, TRUE);
|
||||
set_wm_change_pending (TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -725,9 +733,12 @@ create_dialog (void)
|
|||
dialog = glade_xml_new (GNOMECC_DATA_DIR "/interfaces/gnome-window-properties.glade", "prefs_widget", NULL);
|
||||
|
||||
apply_now_button = WID ("apply_now_button");
|
||||
gtk_widget_set_sensitive (apply_now_button, FALSE);
|
||||
g_signal_connect (G_OBJECT (apply_now_button), "clicked", apply_wm, NULL);
|
||||
|
||||
properties_box = WID ("properties_box");
|
||||
|
||||
set_wm_change_pending (FALSE);
|
||||
|
||||
wm_widget = wm_widget_new ();
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (WID ("wm_widget_box")), wm_widget, TRUE, TRUE, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue