]> git.sur5r.net Git - glabels/commitdiff
2005-04-20 Jim Evins <evins@snaught.com>
authorJim Evins <evins@snaught.com>
Thu, 21 Apr 2005 00:24:05 +0000 (00:24 +0000)
committerJim Evins <evins@snaught.com>
Thu, 21 Apr 2005 00:24:05 +0000 (00:24 +0000)
* 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

glabels2/ChangeLog
glabels2/data/glade/prefs-dialog.glade
glabels2/src/prefs-dialog.c

index b8924d38e8833c8e998794c3e6e6cef5510a1355..2b108464280bb742ebdb37b9f7e5c314ab7e4303 100644 (file)
@@ -1,3 +1,11 @@
+2005-04-20  Jim Evins  <evins@snaught.com>
+
+       * 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  <evins@snaught.com>
 
        * data/glade/object-editor.glade:
index 5b7abf9f772b8215762b925f3af7e309b707cd6b..24562d8a0ae4b2388a56eb5433cc10ab51996c3a 100644 (file)
   <property name="modal">False</property>
   <property name="resizable">True</property>
   <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
   <property name="has_separator">True</property>
 
   <child internal-child="vbox">
@@ -32,6 +38,7 @@
              <property name="label">gtk-close</property>
              <property name="use_stock">True</property>
              <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
              <property name="response_id">-7</property>
            </widget>
          </child>
                  <property name="yalign">0.5</property>
                  <property name="xpad">0</property>
                  <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
                </widget>
                <packing>
                  <property name="padding">0</property>
                          <property name="yalign">0.5</property>
                          <property name="xpad">0</property>
                          <property name="ypad">0</property>
+                         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                         <property name="width_chars">-1</property>
+                         <property name="single_line_mode">False</property>
+                         <property name="angle">0</property>
                        </widget>
                        <packing>
                          <property name="padding">0</property>
                              <property name="label" translatable="yes">Points</property>
                              <property name="use_underline">True</property>
                              <property name="relief">GTK_RELIEF_NORMAL</property>
+                             <property name="focus_on_click">True</property>
                              <property name="active">False</property>
                              <property name="inconsistent">False</property>
                              <property name="draw_indicator">True</property>
                              <property name="label" translatable="yes">Inches</property>
                              <property name="use_underline">True</property>
                              <property name="relief">GTK_RELIEF_NORMAL</property>
+                             <property name="focus_on_click">True</property>
                              <property name="active">False</property>
                              <property name="inconsistent">False</property>
                              <property name="draw_indicator">True</property>
                              <property name="label" translatable="yes">Millimeters</property>
                              <property name="use_underline">True</property>
                              <property name="relief">GTK_RELIEF_NORMAL</property>
+                             <property name="focus_on_click">True</property>
                              <property name="active">False</property>
                              <property name="inconsistent">False</property>
                              <property name="draw_indicator">True</property>
                      <property name="yalign">0.5</property>
                      <property name="xpad">0</property>
                      <property name="ypad">0</property>
+                     <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                     <property name="width_chars">-1</property>
+                     <property name="single_line_mode">False</property>
+                     <property name="angle">0</property>
                    </widget>
                    <packing>
                      <property name="type">label_item</property>
                          <property name="yalign">0.5</property>
                          <property name="xpad">0</property>
                          <property name="ypad">0</property>
+                         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                         <property name="width_chars">-1</property>
+                         <property name="single_line_mode">False</property>
+                         <property name="angle">0</property>
                        </widget>
                        <packing>
                          <property name="padding">0</property>
                              <property name="label" translatable="yes">US Letter</property>
                              <property name="use_underline">True</property>
                              <property name="relief">GTK_RELIEF_NORMAL</property>
+                             <property name="focus_on_click">True</property>
                              <property name="active">False</property>
                              <property name="inconsistent">False</property>
                              <property name="draw_indicator">True</property>
                              <property name="label" translatable="yes">ISO A4</property>
                              <property name="use_underline">True</property>
                              <property name="relief">GTK_RELIEF_NORMAL</property>
+                             <property name="focus_on_click">True</property>
                              <property name="active">False</property>
                              <property name="inconsistent">False</property>
                              <property name="draw_indicator">True</property>
                      <property name="yalign">0.5</property>
                      <property name="xpad">0</property>
                      <property name="ypad">0</property>
+                     <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                     <property name="width_chars">-1</property>
+                     <property name="single_line_mode">False</property>
+                     <property name="angle">0</property>
                    </widget>
                    <packing>
                      <property name="type">label_item</property>
              <property name="yalign">0.5</property>
              <property name="xpad">0</property>
              <property name="ypad">0</property>
+             <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+             <property name="width_chars">-1</property>
+             <property name="single_line_mode">False</property>
+             <property name="angle">0</property>
            </widget>
            <packing>
              <property name="type">tab</property>
                  <property name="yalign">0.5</property>
                  <property name="xpad">0</property>
                  <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
                </widget>
                <packing>
                  <property name="padding">0</property>
                          <property name="yalign">0.5</property>
                          <property name="xpad">0</property>
                          <property name="ypad">0</property>
+                         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                         <property name="width_chars">-1</property>
+                         <property name="single_line_mode">False</property>
+                         <property name="angle">0</property>
                        </widget>
                        <packing>
                          <property name="padding">0</property>
                              <property name="yalign">0.5</property>
                              <property name="xpad">0</property>
                              <property name="ypad">0</property>
+                             <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                             <property name="width_chars">-1</property>
+                             <property name="single_line_mode">False</property>
+                             <property name="angle">0</property>
                            </widget>
                            <packing>
                              <property name="left_attach">0</property>
                              <property name="yalign">0.5</property>
                              <property name="xpad">0</property>
                              <property name="ypad">0</property>
+                             <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                             <property name="width_chars">-1</property>
+                             <property name="single_line_mode">False</property>
+                             <property name="angle">0</property>
                            </widget>
                            <packing>
                              <property name="left_attach">0</property>
                              <property name="yalign">0.5</property>
                              <property name="xpad">0</property>
                              <property name="ypad">0</property>
+                             <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                             <property name="width_chars">-1</property>
+                             <property name="single_line_mode">False</property>
+                             <property name="angle">0</property>
                            </widget>
                            <packing>
                              <property name="left_attach">0</property>
                              <property name="yalign">0.5</property>
                              <property name="xpad">0</property>
                              <property name="ypad">0</property>
+                             <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                             <property name="width_chars">-1</property>
+                             <property name="single_line_mode">False</property>
+                             <property name="angle">0</property>
                            </widget>
                            <packing>
                              <property name="left_attach">0</property>
                              <property name="spacing">12</property>
 
                              <child>
-                               <widget class="GtkCombo" id="text_family_combo">
+                               <widget class="GtkComboBox" id="text_family_combo">
                                  <property name="visible">True</property>
-                                 <property name="value_in_list">True</property>
-                                 <property name="allow_empty">False</property>
-                                 <property name="case_sensitive">False</property>
-                                 <property name="enable_arrow_keys">True</property>
-                                 <property name="enable_arrows_always">False</property>
-
-                                 <child internal-child="entry">
-                                   <widget class="GtkEntry" id="text_family_entry">
-                                     <property name="visible">True</property>
-                                     <property name="can_focus">True</property>
-                                     <property name="editable">True</property>
-                                     <property name="visibility">True</property>
-                                     <property name="max_length">0</property>
-                                     <property name="text" translatable="yes"></property>
-                                     <property name="has_frame">True</property>
-                                     <property name="invisible_char" translatable="yes">*</property>
-                                     <property name="activates_default">False</property>
-                                   </widget>
-                                 </child>
-
-                                 <child internal-child="list">
-                                   <widget class="GtkList" id="combo-list1">
-                                     <property name="visible">True</property>
-                                     <property name="selection_mode">GTK_SELECTION_BROWSE</property>
-                                   </widget>
-                                 </child>
+                                 <property name="add_tearoffs">False</property>
+                                 <property name="focus_on_click">True</property>
                                </widget>
                                <packing>
                                  <property name="padding">0</property>
-                                 <property name="expand">False</property>
-                                 <property name="fill">False</property>
+                                 <property name="expand">True</property>
+                                 <property name="fill">True</property>
                                </packing>
                              </child>
 
                                  <property name="visible">True</property>
                                  <property name="can_focus">True</property>
                                  <property name="relief">GTK_RELIEF_NORMAL</property>
+                                 <property name="focus_on_click">True</property>
                                  <property name="active">False</property>
                                  <property name="inconsistent">False</property>
 
                                  <property name="visible">True</property>
                                  <property name="can_focus">True</property>
                                  <property name="relief">GTK_RELIEF_NORMAL</property>
+                                 <property name="focus_on_click">True</property>
                                  <property name="active">False</property>
                                  <property name="inconsistent">False</property>
 
                                  <property name="visible">True</property>
                                  <property name="can_focus">True</property>
                                  <property name="relief">GTK_RELIEF_NORMAL</property>
+                                 <property name="focus_on_click">True</property>
                                  <property name="active">False</property>
                                  <property name="inconsistent">False</property>
 
                                  <property name="visible">True</property>
                                  <property name="can_focus">True</property>
                                  <property name="relief">GTK_RELIEF_NORMAL</property>
+                                 <property name="focus_on_click">True</property>
                                  <property name="active">False</property>
                                  <property name="inconsistent">False</property>
 
                                  <property name="visible">True</property>
                                  <property name="can_focus">True</property>
                                  <property name="relief">GTK_RELIEF_NORMAL</property>
+                                 <property name="focus_on_click">True</property>
                                  <property name="active">False</property>
                                  <property name="inconsistent">False</property>
 
                                <widget class="GtkSpinButton" id="text_line_spacing_spin">
                                  <property name="visible">True</property>
                                  <property name="can_focus">True</property>
-                                 <property name="climb_rate">0.01</property>
+                                 <property name="climb_rate">0.00999999977648</property>
                                  <property name="digits">2</property>
                                  <property name="numeric">False</property>
                                  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
                      <property name="yalign">0.5</property>
                      <property name="xpad">0</property>
                      <property name="ypad">0</property>
+                     <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                     <property name="width_chars">-1</property>
+                     <property name="single_line_mode">False</property>
+                     <property name="angle">0</property>
                    </widget>
                    <packing>
                      <property name="type">label_item</property>
                          <property name="yalign">0.5</property>
                          <property name="xpad">0</property>
                          <property name="ypad">0</property>
+                         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                         <property name="width_chars">-1</property>
+                         <property name="single_line_mode">False</property>
+                         <property name="angle">0</property>
                        </widget>
                        <packing>
                          <property name="padding">0</property>
                              <property name="yalign">0.5</property>
                              <property name="xpad">0</property>
                              <property name="ypad">0</property>
+                             <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                             <property name="width_chars">-1</property>
+                             <property name="single_line_mode">False</property>
+                             <property name="angle">0</property>
                            </widget>
                            <packing>
                              <property name="left_attach">0</property>
                              <property name="yalign">0.5</property>
                              <property name="xpad">0</property>
                              <property name="ypad">0</property>
+                             <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                             <property name="width_chars">-1</property>
+                             <property name="single_line_mode">False</property>
+                             <property name="angle">0</property>
                            </widget>
                            <packing>
                              <property name="left_attach">0</property>
                                <widget class="GtkSpinButton" id="line_width_spin">
                                  <property name="visible">True</property>
                                  <property name="can_focus">True</property>
-                                 <property name="climb_rate">0.01</property>
+                                 <property name="climb_rate">0.00999999977648</property>
                                  <property name="digits">2</property>
                                  <property name="numeric">True</property>
                                  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
                                  <property name="yalign">0.5</property>
                                  <property name="xpad">0</property>
                                  <property name="ypad">0</property>
+                                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                                 <property name="width_chars">-1</property>
+                                 <property name="single_line_mode">False</property>
+                                 <property name="angle">0</property>
                                </widget>
                                <packing>
                                  <property name="padding">0</property>
                      <property name="yalign">0.5</property>
                      <property name="xpad">0</property>
                      <property name="ypad">0</property>
+                     <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                     <property name="width_chars">-1</property>
+                     <property name="single_line_mode">False</property>
+                     <property name="angle">0</property>
                    </widget>
                    <packing>
                      <property name="type">label_item</property>
                          <property name="yalign">0.5</property>
                          <property name="xpad">0</property>
                          <property name="ypad">0</property>
+                         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                         <property name="width_chars">-1</property>
+                         <property name="single_line_mode">False</property>
+                         <property name="angle">0</property>
                        </widget>
                        <packing>
                          <property name="padding">0</property>
                              <property name="yalign">0.5</property>
                              <property name="xpad">0</property>
                              <property name="ypad">0</property>
+                             <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                             <property name="width_chars">-1</property>
+                             <property name="single_line_mode">False</property>
+                             <property name="angle">0</property>
                            </widget>
                            <packing>
                              <property name="left_attach">0</property>
                      <property name="yalign">0.5</property>
                      <property name="xpad">0</property>
                      <property name="ypad">0</property>
+                     <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                     <property name="width_chars">-1</property>
+                     <property name="single_line_mode">False</property>
+                     <property name="angle">0</property>
                    </widget>
                    <packing>
                      <property name="type">label_item</property>
              <property name="yalign">0.5</property>
              <property name="xpad">0</property>
              <property name="ypad">0</property>
+             <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+             <property name="width_chars">-1</property>
+             <property name="single_line_mode">False</property>
+             <property name="angle">0</property>
            </widget>
            <packing>
              <property name="type">tab</property>
index 43a3d6cc05a3862dd1018c05061d7571b71cb471..33f9456fd11a46481668a6129ca1c6b9d82a2b31 100644 (file)
 #include <glade/glade-xml.h>
 #include <gtk/gtktogglebutton.h>
 #include <gtk/gtkstock.h>
-#include <gtk/gtkcombo.h>
-#include <gtk/gtkentry.h>
+#include <gtk/gtkcombobox.h>
 #include <gtk/gtkspinbutton.h>
 
 #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));