X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-buttonbox.c;h=bcd6e78cf633902805289b35852090327dd38725;hb=51cf173b5eaaa8c5cc6233f9c8924eb44498e89d;hp=087c105587f7e2c83b7c237208bd01a8bd8ad0fa;hpb=5dbf5abcbed01f04422d4dead1c0ae0bb7efde4f;p=pspp diff --git a/src/ui/gui/psppire-buttonbox.c b/src/ui/gui/psppire-buttonbox.c index 087c105587..bcd6e78cf6 100644 --- a/src/ui/gui/psppire-buttonbox.c +++ b/src/ui/gui/psppire-buttonbox.c @@ -32,12 +32,12 @@ GType psppire_button_flags_get_type (void); -static void psppire_button_box_class_init (PsppireButtonboxClass *); -static void psppire_button_box_init (PsppireButtonbox *); +static void psppire_button_box_class_init (PsppireButtonBoxClass *); +static void psppire_button_box_init (PsppireButtonBox *); GType -psppire_buttonbox_get_type (void) +psppire_button_box_get_type (void) { static GType button_box_type = 0; @@ -45,19 +45,19 @@ psppire_buttonbox_get_type (void) { static const GTypeInfo button_box_info = { - sizeof (PsppireButtonboxClass), + sizeof (PsppireButtonBoxClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) psppire_button_box_class_init, NULL, /* class_finalize */ NULL, /* class_data */ - sizeof (PsppireButtonbox), + sizeof (PsppireButtonBox), 0, (GInstanceInitFunc) psppire_button_box_init, }; button_box_type = g_type_register_static (GTK_TYPE_BUTTON_BOX, - "PsppireButtonbox", &button_box_info, 0); + "PsppireButtonBox", &button_box_info, 0); } return button_box_type; @@ -69,11 +69,11 @@ enum { }; static void -set_default (PsppireButtonbox *bb) +set_default (PsppireButtonBox *bb) { int i; - for (i = 0 ; i < n_PsppireButtonboxButtons ; ++i ) + for (i = 0 ; i < n_PsppireButtonBoxButtons ; ++i) if (bb->def == (1 << i)) { gtk_widget_set_can_default (bb->button[i], TRUE); @@ -89,13 +89,13 @@ psppire_buttonbox_set_property (GObject *object, { gint i; guint flags; - PsppireButtonbox *bb = PSPPIRE_BUTTONBOX (object); + PsppireButtonBox *bb = PSPPIRE_BUTTON_BOX (object); switch (prop_id) { case PROP_BUTTONS: flags = g_value_get_flags (value); - for (i = 0 ; i < n_PsppireButtonboxButtons ; ++i ) + for (i = 0 ; i < n_PsppireButtonBoxButtons ; ++i) g_object_set (bb->button[i], "visible", 0x01 & (flags >> i) , NULL); break; @@ -119,17 +119,17 @@ psppire_buttonbox_get_property (GObject *object, guint flags = 0; gint i; - PsppireButtonbox *bb = PSPPIRE_BUTTONBOX (object); + PsppireButtonBox *bb = PSPPIRE_BUTTON_BOX (object); switch (prop_id) { case PROP_BUTTONS: - for (i = 0 ; i < n_PsppireButtonboxButtons ; ++i ) + for (i = 0 ; i < n_PsppireButtonBoxButtons ; ++i) { gboolean visibility; g_object_get (bb->button[i], "visible", &visibility, NULL); - if ( visibility ) + if (visibility) flags |= (0x01 << i); } @@ -162,7 +162,7 @@ static GParamSpec *button_flags; static GParamSpec *default_flags; static void -psppire_button_box_class_init (PsppireButtonboxClass *class) +psppire_button_box_class_init (PsppireButtonBoxClass *class) { GObjectClass *object_class = G_OBJECT_CLASS (class); @@ -205,7 +205,7 @@ close_and_respond (GtkWidget *w, gint response) /* If we're not in a psppire dialog (for example when in glade) then do nothing */ - if ( ! PSPPIRE_IS_DIALOG (toplevel)) + if (! PSPPIRE_IS_DIALOG (toplevel)) return; dialog = PSPPIRE_DIALOG (toplevel); @@ -267,7 +267,7 @@ refresh_clicked (GtkWidget *w, gpointer data) GtkWidget *toplevel = gtk_widget_get_toplevel (w); PsppireDialog *dialog; - if ( ! PSPPIRE_IS_DIALOG (toplevel)) + if (! PSPPIRE_IS_DIALOG (toplevel)) return; dialog = PSPPIRE_DIALOG (toplevel); @@ -281,7 +281,7 @@ help_clicked (GtkWidget *w, gpointer data) GtkWidget *toplevel = gtk_widget_get_toplevel (w); PsppireDialog *dialog; - if ( ! PSPPIRE_IS_DIALOG (toplevel)) + if (! PSPPIRE_IS_DIALOG (toplevel)) return; dialog = PSPPIRE_DIALOG (toplevel); @@ -292,7 +292,7 @@ help_clicked (GtkWidget *w, gpointer data) static void on_validity_change (GtkWidget *toplevel, gboolean valid, gpointer data) { - PsppireButtonbox *bb = data; + PsppireButtonBox *bb = data; /* Set the sensitivity of all the 'executive order' buttons */ gtk_widget_set_sensitive (GTK_WIDGET (bb->button[PSPPIRE_BUTTON_OK]), valid); @@ -304,7 +304,7 @@ on_validity_change (GtkWidget *toplevel, gboolean valid, gpointer data) static gboolean on_key_press (GtkWidget *w, GdkEventKey *e, gpointer ud) { - PsppireButtonbox *bb = PSPPIRE_BUTTONBOX (ud); + PsppireButtonBox *bb = PSPPIRE_BUTTON_BOX (ud); if (e->keyval == GDK_KEY_Escape) { g_signal_emit_by_name (bb->button[PSPPIRE_BUTTON_CANCEL], "activate"); @@ -328,12 +328,12 @@ on_realize (GtkWidget *buttonbox, gpointer data) G_CALLBACK (on_key_press), buttonbox); } - set_default (PSPPIRE_BUTTONBOX (buttonbox)); + set_default (PSPPIRE_BUTTON_BOX (buttonbox)); } static void -psppire_button_box_init (PsppireButtonbox *bb) +psppire_button_box_init (PsppireButtonBox *bb) { bb->def = PSPPIRE_BUTTON_CONTINUE; @@ -409,7 +409,7 @@ psppire_button_box_init (PsppireButtonbox *bb) flags = g_value_get_flags (&value); - for (i = 0 ; i < n_PsppireButtonboxButtons ; ++i ) + for (i = 0 ; i < n_PsppireButtonBoxButtons ; ++i) g_object_set (bb->button[i], "visible", 0x01 & (flags >> i) , NULL); g_value_unset (&value);