From: Jim Evins Date: Thu, 21 Apr 2005 00:24:05 +0000 (+0000) Subject: 2005-04-20 Jim Evins X-Git-Tag: glabels-2_3_0~424 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e95389e41390751097436307edb19d49963e3e59;p=glabels 2005-04-20 Jim Evins * data/glade/prefs-dialog.glade: * src/prefs-dialog.c: (construct_object_page), (update_object_page_from_prefs), (update_prefs_from_object_page): Replaced the deprecated GtkCombo widget with the new GtkComboBox. git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@525 f5e0f49d-192f-0410-a22d-a8d8700d0965 --- diff --git a/glabels2/ChangeLog b/glabels2/ChangeLog index b8924d38..2b108464 100644 --- a/glabels2/ChangeLog +++ b/glabels2/ChangeLog @@ -1,3 +1,11 @@ +2005-04-20 Jim Evins + + * data/glade/prefs-dialog.glade: + * src/prefs-dialog.c: (construct_object_page), + (update_object_page_from_prefs), (update_prefs_from_object_page): + Replaced the deprecated GtkCombo widget with the new + GtkComboBox. + 2005-04-19 Jim Evins * data/glade/object-editor.glade: diff --git a/glabels2/data/glade/prefs-dialog.glade b/glabels2/data/glade/prefs-dialog.glade index 5b7abf9f..24562d8a 100644 --- a/glabels2/data/glade/prefs-dialog.glade +++ b/glabels2/data/glade/prefs-dialog.glade @@ -11,6 +11,12 @@ False True False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True True @@ -32,6 +38,7 @@ gtk-close True GTK_RELIEF_NORMAL + True -7 @@ -74,6 +81,10 @@ 0.5 0 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 0 @@ -108,6 +119,10 @@ 0.5 0 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 0 @@ -130,6 +145,7 @@ Points True GTK_RELIEF_NORMAL + True False False True @@ -148,6 +164,7 @@ Inches True GTK_RELIEF_NORMAL + True False False True @@ -167,6 +184,7 @@ Millimeters True GTK_RELIEF_NORMAL + True False False True @@ -201,6 +219,10 @@ 0.5 0 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 label_item @@ -240,6 +262,10 @@ 0.5 0 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 0 @@ -262,6 +288,7 @@ US Letter True GTK_RELIEF_NORMAL + True False False True @@ -280,6 +307,7 @@ ISO A4 True GTK_RELIEF_NORMAL + True False False True @@ -314,6 +342,10 @@ 0.5 0 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 label_item @@ -346,6 +378,10 @@ 0.5 0 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 tab @@ -372,6 +408,10 @@ 0.5 0 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 0 @@ -406,6 +446,10 @@ 0.5 0 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 0 @@ -436,6 +480,10 @@ 0.5 0 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 0 @@ -460,6 +508,10 @@ 0.5 0 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 0 @@ -484,6 +536,10 @@ 0.5 0 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 0 @@ -509,6 +565,10 @@ 0.5 0 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 0 @@ -527,39 +587,15 @@ 12 - + True - True - False - False - True - False - - - - True - True - True - True - 0 - - True - * - False - - - - - - True - GTK_SELECTION_BROWSE - - + False + True 0 - False - False + True + True @@ -587,6 +623,7 @@ True True GTK_RELIEF_NORMAL + True False False @@ -614,6 +651,7 @@ True True GTK_RELIEF_NORMAL + True False False @@ -687,6 +725,7 @@ True True GTK_RELIEF_NORMAL + True False False @@ -714,6 +753,7 @@ True True GTK_RELIEF_NORMAL + True False False @@ -741,6 +781,7 @@ True True GTK_RELIEF_NORMAL + True False False @@ -783,7 +824,7 @@ True True - 0.01 + 0.00999999977648 2 False GTK_UPDATE_ALWAYS @@ -830,6 +871,10 @@ 0.5 0 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 label_item @@ -869,6 +914,10 @@ 0.5 0 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 0 @@ -900,6 +949,10 @@ 0.5 0 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 0 @@ -924,6 +977,10 @@ 0.5 0 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 0 @@ -945,7 +1002,7 @@ True True - 0.01 + 0.00999999977648 2 True GTK_UPDATE_ALWAYS @@ -973,6 +1030,10 @@ 0.5 0 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 0 @@ -1043,6 +1104,10 @@ 0.5 0 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 label_item @@ -1082,6 +1147,10 @@ 0.5 0 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 0 @@ -1113,6 +1182,10 @@ 0.5 0 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 0 @@ -1176,6 +1249,10 @@ 0.5 0 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 label_item @@ -1208,6 +1285,10 @@ 0.5 0 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 tab diff --git a/glabels2/src/prefs-dialog.c b/glabels2/src/prefs-dialog.c index 43a3d6cc..33f9456f 100644 --- a/glabels2/src/prefs-dialog.c +++ b/glabels2/src/prefs-dialog.c @@ -28,13 +28,14 @@ #include #include #include -#include -#include +#include #include #include "prefs.h" #include "mygal/widget-color-combo.h" #include "color.h" +#include "util.h" + #include "debug.h" /*========================================================*/ @@ -62,7 +63,6 @@ struct _glPrefsDialogPrivate GtkWidget *page_size_a4_radio; /* Default text properties */ - GtkWidget *text_family_entry; GtkWidget *text_family_combo; GtkWidget *text_size_spin; GtkWidget *text_bold_toggle; @@ -329,8 +329,6 @@ construct_object_page (glPrefsDialog *dlg) { GList *family_names; - dlg->priv->text_family_entry = - glade_xml_get_widget (dlg->priv->gui, "text_family_entry"); dlg->priv->text_family_combo = glade_xml_get_widget (dlg->priv->gui, "text_family_combo"); dlg->priv->text_size_spin = @@ -358,14 +356,16 @@ construct_object_page (glPrefsDialog *dlg) dlg->priv->fill_color_combo = glade_xml_get_widget (dlg->priv->gui, "fill_color_combo"); + gl_util_combo_box_add_text_model (GTK_COMBO_BOX (dlg->priv->text_family_combo)); + /* Load family names */ family_names = gnome_font_family_list (); - gtk_combo_set_popdown_strings (GTK_COMBO(dlg->priv->text_family_combo), + gl_util_combo_box_set_strings (GTK_COMBO_BOX (dlg->priv->text_family_combo), family_names); gnome_font_family_list_free (family_names); - g_signal_connect_swapped (G_OBJECT(dlg->priv->text_family_entry), + g_signal_connect_swapped (G_OBJECT(dlg->priv->text_family_combo), "changed", G_CALLBACK(update_prefs_from_object_page), G_OBJECT(dlg)); @@ -543,7 +543,7 @@ update_object_page_from_prefs (glPrefsDialog *dlg) GdkColor *gdk_color; g_signal_handlers_block_by_func ( - G_OBJECT(dlg->priv->text_family_entry), + G_OBJECT(dlg->priv->text_family_combo), G_CALLBACK(update_prefs_from_object_page), G_OBJECT(dlg)); g_signal_handlers_block_by_func ( G_OBJECT(dlg->priv->text_size_spin), @@ -594,7 +594,8 @@ update_object_page_from_prefs (glPrefsDialog *dlg) } } gnome_font_family_list_free (family_names); - gtk_entry_set_text (GTK_ENTRY (dlg->priv->text_family_entry), good_font_family); + gl_util_combo_box_set_active_text (GTK_COMBO_BOX (dlg->priv->text_family_combo), + good_font_family); g_free (good_font_family); gtk_spin_button_set_value (GTK_SPIN_BUTTON (dlg->priv->text_size_spin), @@ -634,7 +635,7 @@ update_object_page_from_prefs (glPrefsDialog *dlg) g_signal_handlers_unblock_by_func ( - G_OBJECT(dlg->priv->text_family_entry), + G_OBJECT(dlg->priv->text_family_combo), G_CALLBACK(update_prefs_from_object_page), G_OBJECT(dlg)); g_signal_handlers_unblock_by_func ( G_OBJECT(dlg->priv->text_size_spin), @@ -714,8 +715,7 @@ update_prefs_from_object_page (glPrefsDialog *dlg) g_free (gl_prefs->default_font_family); gl_prefs->default_font_family = - gtk_editable_get_chars (GTK_EDITABLE (dlg->priv->text_family_entry), - 0, -1); + gtk_combo_box_get_active_text (GTK_COMBO_BOX (dlg->priv->text_family_combo)); gl_prefs->default_font_size = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->text_size_spin));