]> git.sur5r.net Git - glabels/commitdiff
2005-04-19 Jim Evins <evins@snaught.com>
authorJim Evins <evins@snaught.com>
Wed, 20 Apr 2005 00:01:30 +0000 (00:01 +0000)
committerJim Evins <evins@snaught.com>
Wed, 20 Apr 2005 00:01:30 +0000 (00:01 +0000)
* data/glade/object-editor.glade:
* src/object-editor-bc-page.c: (gl_object_editor_prepare_bc_page),
(style_changed_cb), (gl_object_editor_set_bc_style),
(gl_object_editor_get_bc_style), (gl_object_editor_set_bc_color),
(gl_object_editor_get_bc_color):
* src/object-editor-data-page.c:
(gl_object_editor_prepare_data_page), (gl_object_editor_set_data),
(gl_object_editor_get_data):
* src/object-editor-edit-page.c:
(gl_object_editor_prepare_edit_page), (insert_button_cb):
* src/object-editor-fill-page.c:
(gl_object_editor_prepare_fill_page),
(gl_object_editor_set_fill_color),
(gl_object_editor_get_fill_color):
* src/object-editor-image-page.c:
(gl_object_editor_prepare_image_page),
(gl_object_editor_set_image), (gl_object_editor_get_image):
* src/object-editor-line-page.c:
(gl_object_editor_prepare_line_page),
(gl_object_editor_set_line_color),
(gl_object_editor_get_line_color):
* src/object-editor-private.h:
* src/object-editor-text-page.c:
(gl_object_editor_prepare_text_page),
(gl_object_editor_set_font_family),
(gl_object_editor_get_font_family),
(gl_object_editor_set_text_color),
(gl_object_editor_get_text_color):
* src/object-editor.c: (gl_object_editor_set_key_names):
* src/ui-sidebar.c:
In the object editor: replaced all instances of the deprecated
GtkCombo widget with the new GtkComboBox.

git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@524 f5e0f49d-192f-0410-a22d-a8d8700d0965

12 files changed:
glabels2/ChangeLog
glabels2/data/glade/object-editor.glade
glabels2/src/object-editor-bc-page.c
glabels2/src/object-editor-data-page.c
glabels2/src/object-editor-edit-page.c
glabels2/src/object-editor-fill-page.c
glabels2/src/object-editor-image-page.c
glabels2/src/object-editor-line-page.c
glabels2/src/object-editor-private.h
glabels2/src/object-editor-text-page.c
glabels2/src/object-editor.c
glabels2/src/ui-sidebar.c

index a47d3dff09e34983b71d12539aa6d103fd46b091..b8924d38e8833c8e998794c3e6e6cef5510a1355 100644 (file)
@@ -1,3 +1,38 @@
+2005-04-19  Jim Evins  <evins@snaught.com>
+
+       * data/glade/object-editor.glade:
+       * src/object-editor-bc-page.c: (gl_object_editor_prepare_bc_page),
+       (style_changed_cb), (gl_object_editor_set_bc_style),
+       (gl_object_editor_get_bc_style), (gl_object_editor_set_bc_color),
+       (gl_object_editor_get_bc_color):
+       * src/object-editor-data-page.c:
+       (gl_object_editor_prepare_data_page), (gl_object_editor_set_data),
+       (gl_object_editor_get_data):
+       * src/object-editor-edit-page.c:
+       (gl_object_editor_prepare_edit_page), (insert_button_cb):
+       * src/object-editor-fill-page.c:
+       (gl_object_editor_prepare_fill_page),
+       (gl_object_editor_set_fill_color),
+       (gl_object_editor_get_fill_color):
+       * src/object-editor-image-page.c:
+       (gl_object_editor_prepare_image_page),
+       (gl_object_editor_set_image), (gl_object_editor_get_image):
+       * src/object-editor-line-page.c:
+       (gl_object_editor_prepare_line_page),
+       (gl_object_editor_set_line_color),
+       (gl_object_editor_get_line_color):
+       * src/object-editor-private.h:
+       * src/object-editor-text-page.c:
+       (gl_object_editor_prepare_text_page),
+       (gl_object_editor_set_font_family),
+       (gl_object_editor_get_font_family),
+       (gl_object_editor_set_text_color),
+       (gl_object_editor_get_text_color):
+       * src/object-editor.c: (gl_object_editor_set_key_names):
+       * src/ui-sidebar.c:
+               In the object editor: replaced all instances of the deprecated
+               GtkCombo widget with the new GtkComboBox.
+
 2005-04-18  Jim Evins  <evins@snaught.com>
 
        * src/stock.c:
index f9bb0579d831e971f227ed6f42cf3d3c39e0e6be..386e96fd85bf3bfb69475cdbc563d7c360ddeca0 100644 (file)
                      </child>
 
                      <child>
-                       <widget class="GtkCombo" id="edit_key_combo">
+                       <widget class="GtkComboBox" id="edit_key_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="edit_key_entry">
-                             <property name="width_request">66</property>
-                             <property name="visible">True</property>
-                             <property name="can_focus">True</property>
-                             <property name="editable">False</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">*</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="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">False</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">*</property>
-                                 <property name="activates_default">False</property>
-                               </widget>
-                             </child>
-
-                             <child internal-child="list">
-                               <widget class="GtkList" id="combo-list2">
-                                 <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>
                        </widget>
                                  <property name="spacing">12</property>
 
                                  <child>
-                                   <widget class="GtkCombo" id="text_color_key_combo">
-                                     <property name="width_request">80</property>
+                                   <widget class="GtkComboBox" id="text_color_key_combo">
                                      <property name="visible">True</property>
-                                     <property name="value_in_list">False</property>
-                                     <property name="allow_empty">True</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_color_key_entry">
-                                         <property name="visible">True</property>
-                                         <property name="can_focus">True</property>
-                                         <property name="editable">False</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">*</property>
-                                         <property name="activates_default">False</property>
-                                       </widget>
-                                     </child>
-
-                                     <child internal-child="list">
-                                       <widget class="GtkList" id="list4">
-                                         <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>
                                </widget>
                                  <property name="spacing">12</property>
 
                                  <child>
-                                   <widget class="GtkCombo" id="line_key_combo">
-                                     <property name="width_request">80</property>
+                                   <widget class="GtkComboBox" id="line_key_combo">
                                      <property name="visible">True</property>
-                                     <property name="value_in_list">False</property>
-                                     <property name="allow_empty">True</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="line_key_entry">
-                                         <property name="visible">True</property>
-                                         <property name="can_focus">True</property>
-                                         <property name="editable">False</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">*</property>
-                                         <property name="activates_default">False</property>
-                                       </widget>
-                                     </child>
-
-                                     <child internal-child="list">
-                                       <widget class="GtkList" id="list3">
-                                         <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>
                                </widget>
                                  <property name="spacing">12</property>
 
                                  <child>
-                                   <widget class="GtkCombo" id="fill_key_combo">
-                                     <property name="width_request">80</property>
+                                   <widget class="GtkComboBox" id="fill_key_combo">
                                      <property name="visible">True</property>
-                                     <property name="value_in_list">False</property>
-                                     <property name="allow_empty">True</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="fill_key_entry">
-                                         <property name="visible">True</property>
-                                         <property name="can_focus">True</property>
-                                         <property name="editable">False</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">*</property>
-                                         <property name="activates_default">False</property>
-                                       </widget>
-                                     </child>
-
-                                     <child internal-child="list">
-                                       <widget class="GtkList" id="list6">
-                                         <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>
                                </widget>
                        </packing>
                      </child>
 
-                     <child>
-                       <widget class="GtkCombo" id="img_key_combo">
-                         <property name="visible">True</property>
-                         <property name="value_in_list">False</property>
-                         <property name="allow_empty">True</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="img_key_entry">
-                             <property name="visible">True</property>
-                             <property name="can_focus">True</property>
-                             <property name="editable">False</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">*</property>
-                             <property name="activates_default">False</property>
-                           </widget>
-                         </child>
-
-                         <child internal-child="list">
-                           <widget class="GtkList" id="combo-list3">
-                             <property name="visible">True</property>
-                             <property name="selection_mode">GTK_SELECTION_BROWSE</property>
-                           </widget>
-                         </child>
-                       </widget>
-                       <packing>
-                         <property name="left_attach">1</property>
-                         <property name="right_attach">2</property>
-                         <property name="top_attach">1</property>
-                         <property name="bottom_attach">2</property>
-                         <property name="y_options"></property>
-                       </packing>
-                     </child>
-
                      <child>
                        <widget class="GtkFileChooserButton" id="img_file_button">
                          <property name="visible">True</property>
                          <property name="y_options">fill</property>
                        </packing>
                      </child>
+
+                     <child>
+                       <widget class="GtkComboBox" id="img_key_combo">
+                         <property name="visible">True</property>
+                         <property name="add_tearoffs">False</property>
+                         <property name="focus_on_click">True</property>
+                       </widget>
+                       <packing>
+                         <property name="left_attach">1</property>
+                         <property name="right_attach">2</property>
+                         <property name="top_attach">1</property>
+                         <property name="bottom_attach">2</property>
+                         <property name="y_options">fill</property>
+                       </packing>
+                     </child>
                    </widget>
                    <packing>
                      <property name="padding">0</property>
                          <property name="spacing">12</property>
 
                          <child>
-                           <widget class="GtkCombo" id="data_key_combo">
+                           <widget class="GtkComboBox" id="data_key_combo">
                              <property name="visible">True</property>
-                             <property name="value_in_list">False</property>
-                             <property name="allow_empty">True</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="data_key_entry">
-                                 <property name="visible">True</property>
-                                 <property name="can_focus">True</property>
-                                 <property name="editable">False</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">*</property>
-                                 <property name="activates_default">False</property>
-                               </widget>
-                             </child>
-
-                             <child internal-child="list">
-                               <widget class="GtkList" id="combo-list5">
-                                 <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>
                        </widget>
                      <property name="row_spacing">12</property>
                      <property name="column_spacing">12</property>
 
-                     <child>
-                       <widget class="GtkLabel" id="bc_style_label">
-                         <property name="visible">True</property>
-                         <property name="label" translatable="yes">Style:</property>
-                         <property name="use_underline">False</property>
-                         <property name="use_markup">False</property>
-                         <property name="justify">GTK_JUSTIFY_LEFT</property>
-                         <property name="wrap">False</property>
-                         <property name="selectable">False</property>
-                         <property name="xalign">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="right_attach">1</property>
-                         <property name="top_attach">0</property>
-                         <property name="bottom_attach">1</property>
-                         <property name="x_options">fill</property>
-                         <property name="y_options"></property>
-                       </packing>
-                     </child>
-
                      <child>
                        <widget class="GtkHBox" id="hbox20">
                          <property name="visible">True</property>
                          <property name="spacing">12</property>
 
                          <child>
-                           <widget class="GtkCombo" id="bc_style_combo">
+                           <widget class="GtkComboBox" id="bc_style_combo">
                              <property name="visible">True</property>
-                             <property name="value_in_list">True</property>
-                             <property name="allow_empty">True</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="bc_style_entry">
-                                 <property name="visible">True</property>
-                                 <property name="can_focus">True</property>
-                                 <property name="editable">False</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">*</property>
-                                 <property name="activates_default">False</property>
-                               </widget>
-                             </child>
-
-                             <child internal-child="list">
-                               <widget class="GtkList" id="combo-list4">
-                                 <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="right_attach">2</property>
                          <property name="top_attach">1</property>
                          <property name="bottom_attach">2</property>
-                         <property name="x_options">fill</property>
-                         <property name="y_options"></property>
-                       </packing>
-                     </child>
-
-                     <child>
-                       <widget class="GtkCheckButton" id="bc_cs_check">
-                         <property name="visible">True</property>
-                         <property name="can_focus">True</property>
-                         <property name="label" translatable="yes">Checksum</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>
-                       </widget>
-                       <packing>
-                         <property name="left_attach">0</property>
-                         <property name="right_attach">2</property>
-                         <property name="top_attach">2</property>
-                         <property name="bottom_attach">3</property>
-                         <property name="x_options">fill</property>
                          <property name="y_options"></property>
                        </packing>
                      </child>
                                  <property name="spacing">12</property>
 
                                  <child>
-                                   <widget class="GtkCombo" id="bc_key_combo">
-                                     <property name="width_request">80</property>
+                                   <widget class="GtkComboBox" id="bc_key_combo">
                                      <property name="visible">True</property>
-                                     <property name="value_in_list">False</property>
-                                     <property name="allow_empty">True</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="bc_key_entry">
-                                         <property name="visible">True</property>
-                                         <property name="can_focus">True</property>
-                                         <property name="editable">False</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">*</property>
-                                         <property name="activates_default">False</property>
-                                       </widget>
-                                     </child>
-
-                                     <child internal-child="list">
-                                       <widget class="GtkList" id="list5">
-                                         <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>
                                </widget>
                          <property name="right_attach">2</property>
                          <property name="top_attach">3</property>
                          <property name="bottom_attach">4</property>
-                         <property name="x_options">fill</property>
                          <property name="y_options">fill</property>
                        </packing>
                      </child>
 
+                     <child>
+                       <widget class="GtkCheckButton" id="bc_cs_check">
+                         <property name="visible">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="label" translatable="yes">Checksum</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>
+                       </widget>
+                       <packing>
+                         <property name="left_attach">0</property>
+                         <property name="right_attach">2</property>
+                         <property name="top_attach">2</property>
+                         <property name="bottom_attach">3</property>
+                         <property name="y_options"></property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkLabel" id="bc_style_label">
+                         <property name="visible">True</property>
+                         <property name="label" translatable="yes">Style:</property>
+                         <property name="use_underline">False</property>
+                         <property name="use_markup">False</property>
+                         <property name="justify">GTK_JUSTIFY_LEFT</property>
+                         <property name="wrap">False</property>
+                         <property name="selectable">False</property>
+                         <property name="xalign">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="right_attach">1</property>
+                         <property name="top_attach">0</property>
+                         <property name="bottom_attach">1</property>
+                         <property name="x_options">fill</property>
+                         <property name="y_options"></property>
+                       </packing>
+                     </child>
+
                      <child>
                        <widget class="GtkLabel" id="bc_color_label">
                          <property name="visible">True</property>
index b026ef8d874be2d4abfba1045e65a41b23788d15..b5b57fc7275c1569412de6ccac7a4626841e4459 100644 (file)
@@ -26,9 +26,8 @@
 #include <glib/gi18n.h>
 #include <gtk/gtklabel.h>
 #include <gtk/gtkspinbutton.h>
-#include <gtk/gtkcombo.h>
+#include <gtk/gtkcombobox.h>
 #include <gtk/gtktogglebutton.h>
-#include <gtk/gtkeditable.h>
 #include <math.h>
 
 #include "prefs.h"
@@ -72,8 +71,6 @@ gl_object_editor_prepare_bc_page (glObjectEditor       *editor)
        /* Extract widgets from XML tree. */
        editor->priv->bc_page_vbox =
                glade_xml_get_widget (editor->priv->gui, "bc_page_vbox");
-       editor->priv->bc_style_entry =
-               glade_xml_get_widget (editor->priv->gui, "bc_style_entry");
        editor->priv->bc_style_combo =
                glade_xml_get_widget (editor->priv->gui, "bc_style_combo");
        editor->priv->bc_text_check =
@@ -84,8 +81,6 @@ gl_object_editor_prepare_bc_page (glObjectEditor       *editor)
                glade_xml_get_widget (editor->priv->gui, "bc_color_combo");
        editor->priv->bc_key_combo = 
                glade_xml_get_widget (editor->priv->gui, "bc_key_combo");       
-       editor->priv->bc_key_entry = 
-               glade_xml_get_widget (editor->priv->gui, "bc_key_entry");       
        editor->priv->bc_key_radio = 
                glade_xml_get_widget (editor->priv->gui, "bc_key_radio");       
        editor->priv->bc_color_radio = 
@@ -101,9 +96,13 @@ gl_object_editor_prepare_bc_page (glObjectEditor       *editor)
 
        editor->priv->data_format_fixed_flag = FALSE;
 
+       gl_util_combo_box_add_text_model ( GTK_COMBO_BOX(editor->priv->bc_style_combo));
+       gl_util_combo_box_add_text_model ( GTK_COMBO_BOX(editor->priv->bc_key_combo));
+
        /* Load barcode styles */
        styles = gl_barcode_get_styles_list ();
-       gtk_combo_set_popdown_strings (GTK_COMBO(editor->priv->bc_style_combo), styles);
+       gl_util_combo_box_set_strings (GTK_COMBO_BOX(editor->priv->bc_style_combo),
+                                      styles);
        gl_barcode_free_styles_list (styles);
 
        /* Modify widgets */
@@ -115,7 +114,7 @@ gl_object_editor_prepare_bc_page (glObjectEditor       *editor)
        gtk_widget_show_all (editor->priv->bc_page_vbox);
 
        /* Connect signals */
-       g_signal_connect_swapped (G_OBJECT (editor->priv->bc_style_entry),
+       g_signal_connect_swapped (G_OBJECT (editor->priv->bc_style_combo),
                                  "changed",
                                  G_CALLBACK (style_changed_cb),
                                  G_OBJECT (editor));
@@ -131,7 +130,7 @@ gl_object_editor_prepare_bc_page (glObjectEditor       *editor)
                                  "color_changed",
                                  G_CALLBACK (gl_object_editor_changed_cb),
                                  G_OBJECT (editor));
-       g_signal_connect_swapped (G_OBJECT (editor->priv->bc_key_entry),
+       g_signal_connect_swapped (G_OBJECT (editor->priv->bc_key_combo),
                                  "changed",
                                  G_CALLBACK (gl_object_editor_changed_cb),
                                  G_OBJECT (editor));
@@ -163,7 +162,7 @@ style_changed_cb (glObjectEditor       *editor)
        guint           digits;
                                                                                 
         style_string =
-                gtk_editable_get_chars (GTK_EDITABLE(editor->priv->bc_style_entry), 0, -1);
+               gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->bc_style_combo));
                                                                                 
         /* Don't emit if entry is empty. */
         if ( *style_string != 0 ) {
@@ -223,12 +222,11 @@ gl_object_editor_set_bc_style (glObjectEditor      *editor,
                               guint                format_digits)
 {
        const gchar *style_string;
-        gint         pos;
        gchar       *ex_string;
  
        gl_debug (DEBUG_EDITOR, "START");
 
-        g_signal_handlers_block_by_func (G_OBJECT(editor->priv->bc_style_entry),
+        g_signal_handlers_block_by_func (G_OBJECT(editor->priv->bc_style_combo),
                                          G_CALLBACK (style_changed_cb),
                                          editor);
         g_signal_handlers_block_by_func (G_OBJECT(editor->priv->bc_text_check),
@@ -243,14 +241,8 @@ gl_object_editor_set_bc_style (glObjectEditor      *editor,
 
         style_string = gl_barcode_id_to_name (id);
  
-        gtk_editable_delete_text (GTK_EDITABLE (editor->priv->bc_style_entry),
-                                  0, -1);
-        pos = 0;
-        gtk_editable_insert_text (GTK_EDITABLE (editor->priv->bc_style_entry),
-                                  style_string,
-                                  strlen (style_string),
-                                  &pos);
+       gl_util_combo_box_set_active_text (GTK_COMBO_BOX (editor->priv->bc_style_combo),
+                                          style_string);
  
         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->bc_text_check),
                                       text_flag);
@@ -290,7 +282,7 @@ gl_object_editor_set_bc_style (glObjectEditor      *editor,
                                          !editor->priv->data_format_fixed_flag);
        }
  
-        g_signal_handlers_unblock_by_func (G_OBJECT(editor->priv->bc_style_entry),
+        g_signal_handlers_unblock_by_func (G_OBJECT(editor->priv->bc_style_combo),
                                           G_CALLBACK (style_changed_cb),
                                           editor);
         g_signal_handlers_unblock_by_func (G_OBJECT(editor->priv->bc_text_check),
@@ -321,8 +313,7 @@ gl_object_editor_get_bc_style (glObjectEditor      *editor,
        gl_debug (DEBUG_EDITOR, "START");
                                                                                 
         style_string =
-                gtk_editable_get_chars (GTK_EDITABLE(editor->priv->bc_style_entry),
-                                        0, -1);
+               gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->bc_style_combo));
         *id = g_strdup (gl_barcode_name_to_id (style_string));
                                                                                 
         *text_flag =
@@ -349,14 +340,13 @@ gl_object_editor_set_bc_color (glObjectEditor      *editor,
                               glColorNode         *color_node)
 {
        GdkColor *gdk_color;
-       gint pos;
 
        gl_debug (DEBUG_EDITOR, "START");
 
        g_signal_handlers_block_by_func (G_OBJECT(editor->priv->bc_color_combo),
                                         gl_object_editor_changed_cb,
                                         editor);
-       g_signal_handlers_block_by_func (G_OBJECT(editor->priv->bc_key_entry),
+       g_signal_handlers_block_by_func (G_OBJECT(editor->priv->bc_key_combo),
                                         gl_object_editor_changed_cb,
                                         editor);
 
@@ -386,20 +376,14 @@ gl_object_editor_set_bc_color (glObjectEditor      *editor,
                gtk_widget_set_sensitive (editor->priv->bc_color_combo, FALSE);
                gtk_widget_set_sensitive (editor->priv->bc_key_combo, TRUE);
                
-               gtk_editable_delete_text (GTK_EDITABLE (editor->priv->bc_key_entry), 0, -1);
-               pos = 0;
-               if (color_node->key != NULL ) {
-                       gtk_editable_insert_text (GTK_EDITABLE (editor->priv->bc_key_entry),
-                                                                       color_node->key,
-                                                                       strlen (color_node->key),
-                                                                       &pos);
-               }
+               gl_util_combo_box_set_active_text (GTK_COMBO_BOX (editor->priv->bc_key_combo),
+                                                  color_node->key);
        }       
        
        g_signal_handlers_unblock_by_func (G_OBJECT(editor->priv->bc_color_combo),
                                           gl_object_editor_changed_cb,
                                           editor);
-       g_signal_handlers_unblock_by_func (G_OBJECT(editor->priv->bc_key_entry),
+       g_signal_handlers_unblock_by_func (G_OBJECT(editor->priv->bc_key_combo),
                                           gl_object_editor_changed_cb,
                                           editor);
        
@@ -424,7 +408,7 @@ gl_object_editor_get_bc_color (glObjectEditor      *editor)
                color_node->field_flag = TRUE;
                color_node->color = gl_prefs->default_line_color;
                color_node->key = 
-                       gtk_editable_get_chars (GTK_EDITABLE (editor->priv->bc_key_entry), 0, -1);
+                       gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->bc_key_combo));
        } else {
                color_node->field_flag = FALSE;
                color_node->key = NULL;
index 518f1618ecd6e9e4e69ed58ef75537ef06d3284d..24b7e52345b59520044d242cd8304edca7a53aef 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <glib/gi18n.h>
 #include <gtk/gtkeditable.h>
+#include <gtk/gtkcombobox.h>
 #include <gtk/gtktogglebutton.h>
 #include <math.h>
 
@@ -75,8 +76,8 @@ gl_object_editor_prepare_data_page (glObjectEditor *editor)
                                                                 "data_text_entry");
        editor->priv->data_key_combo     = glade_xml_get_widget (editor->priv->gui,
                                                                 "data_key_combo");
-       editor->priv->data_key_entry     = glade_xml_get_widget (editor->priv->gui,
-                                                                "data_key_entry");
+
+       gl_util_combo_box_add_text_model ( GTK_COMBO_BOX(editor->priv->data_key_combo));
 
        /* Un-hide */
        gtk_widget_show_all (editor->priv->data_page_vbox);
@@ -86,7 +87,7 @@ gl_object_editor_prepare_data_page (glObjectEditor *editor)
                                  "changed",
                                  G_CALLBACK (gl_object_editor_changed_cb),
                                  G_OBJECT (editor));
-       g_signal_connect_swapped (G_OBJECT (editor->priv->data_key_entry),
+       g_signal_connect_swapped (G_OBJECT (editor->priv->data_key_combo),
                                  "changed",
                                  G_CALLBACK (gl_object_editor_changed_cb),
                                  G_OBJECT (editor));
@@ -149,7 +150,7 @@ gl_object_editor_set_data (glObjectEditor      *editor,
        g_signal_handlers_block_by_func (G_OBJECT (editor->priv->data_text_entry),
                                         G_CALLBACK (gl_object_editor_changed_cb),
                                         editor);
-       g_signal_handlers_block_by_func (G_OBJECT (editor->priv->data_key_entry),
+       g_signal_handlers_block_by_func (G_OBJECT (editor->priv->data_key_combo),
                                         G_CALLBACK (gl_object_editor_changed_cb),
                                         editor);
 
@@ -189,19 +190,16 @@ gl_object_editor_set_data (glObjectEditor      *editor,
                gtk_widget_set_sensitive (editor->priv->data_digits_spin,
                                          !editor->priv->data_format_fixed_flag);
                                                                                 
-                gtk_editable_delete_text (GTK_EDITABLE (editor->priv->data_key_entry), 0, -1);
-                pos = 0;
-                gtk_editable_insert_text (GTK_EDITABLE (editor->priv->data_key_entry),
-                                          text_node->data,
-                                          strlen (text_node->data),
-                                          &pos);
+
+               gl_util_combo_box_set_active_text (GTK_COMBO_BOX (editor->priv->data_key_combo),
+                                                  text_node->data);
         }
                                                                                 
 
        g_signal_handlers_unblock_by_func (G_OBJECT (editor->priv->data_text_entry),
                                           G_CALLBACK (gl_object_editor_changed_cb),
                                           editor);
-       g_signal_handlers_unblock_by_func (G_OBJECT (editor->priv->data_key_entry),
+       g_signal_handlers_unblock_by_func (G_OBJECT (editor->priv->data_key_combo),
                                           G_CALLBACK (gl_object_editor_changed_cb),
                                           editor);
 
@@ -228,8 +226,7 @@ gl_object_editor_get_data (glObjectEditor      *editor)
         } else {
                 text_node->field_flag = TRUE;
                 text_node->data =
-                    gtk_editable_get_chars (GTK_EDITABLE (editor->priv->data_key_entry),
-                                            0, -1);
+                       gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->data_key_combo));
         }
  
        gl_debug (DEBUG_EDITOR, "text_node: field_flag=%d, data=%s",
index d9e25ead2a44f6e7b4eb9beaa8fe434d0840ba3a..ba9c584bc0c3021a14f7500efa3ac71c5fbf4412 100644 (file)
@@ -24,9 +24,8 @@
 #include "object-editor.h"
 
 #include <glib/gi18n.h>
-#include <gtk/gtksizegroup.h>
-#include <gtk/gtkeditable.h>
 #include <gtk/gtktextview.h>
+#include <gtk/gtkcombobox.h>
 #include <math.h>
 
 #include "prefs.h"
@@ -63,7 +62,6 @@ void
 gl_object_editor_prepare_edit_page (glObjectEditor       *editor)
 {
        GList        *family_names = NULL;
-       GtkSizeGroup *label_size_group;
        GtkWidget    *label;
 
        gl_debug (DEBUG_EDITOR, "START");
@@ -75,13 +73,13 @@ gl_object_editor_prepare_edit_page (glObjectEditor       *editor)
                glade_xml_get_widget (editor->priv->gui, "edit_text_view");
        editor->priv->edit_key_label =
                glade_xml_get_widget (editor->priv->gui, "edit_key_label");
-       editor->priv->edit_key_entry =
-               glade_xml_get_widget (editor->priv->gui, "edit_key_entry");
        editor->priv->edit_key_combo =
                glade_xml_get_widget (editor->priv->gui, "edit_key_combo");
        editor->priv->edit_insert_field_button =
                glade_xml_get_widget (editor->priv->gui, "edit_insert_field_button");
 
+       gl_util_combo_box_add_text_model ( GTK_COMBO_BOX(editor->priv->edit_key_combo));
+
        /* Un-hide */
        gtk_widget_show_all (editor->priv->edit_page_vbox);
 
@@ -105,8 +103,7 @@ insert_button_cb (glObjectEditor  *editor)
  
         gl_debug (DEBUG_EDITOR, "START");
  
-        key =
-            gtk_editable_get_chars (GTK_EDITABLE (editor->priv->edit_key_entry), 0, -1);
+       key = gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->edit_key_combo));
         field = g_strdup_printf ("${%s}", key);
         gl_debug (DEBUG_WDGT, "Inserting %s", field);
  
index 8f264633a46f1b9ab30061044122ff2c15bc4b2b..a09532b153191bddac36b823e89962b401e71c21 100644 (file)
@@ -25,7 +25,7 @@
 
 #include <glib/gi18n.h>
 #include <gtk/gtktogglebutton.h>
-#include <gtk/gtkeditable.h>
+#include <gtk/gtkcombobox.h>
 #include <math.h>
 
 #include "prefs.h"
@@ -72,14 +72,14 @@ gl_object_editor_prepare_fill_page (glObjectEditor *editor)
                                                               "fill_color_combo");
        editor->priv->fill_key_combo = glade_xml_get_widget (editor->priv->gui,
                                                                "fill_key_combo");      
-       editor->priv->fill_key_entry = glade_xml_get_widget (editor->priv->gui,
-                                                               "fill_key_entry");      
        editor->priv->fill_key_radio = glade_xml_get_widget (editor->priv->gui,
                                                                "fill_key_radio");      
        editor->priv->fill_color_radio = glade_xml_get_widget (editor->priv->gui,
                                                                "fill_color_radio");    
 
        
+       gl_util_combo_box_add_text_model ( GTK_COMBO_BOX(editor->priv->fill_key_combo));
+
        /* Modify widgets based on configuration */
        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->fill_color_radio), TRUE);
        gtk_widget_set_sensitive (editor->priv->fill_color_combo, TRUE);
@@ -96,7 +96,7 @@ gl_object_editor_prepare_fill_page (glObjectEditor *editor)
                                  "color_changed",
                                  G_CALLBACK (gl_object_editor_changed_cb),
                                  G_OBJECT (editor));
-       g_signal_connect_swapped (G_OBJECT (editor->priv->fill_key_entry),
+       g_signal_connect_swapped (G_OBJECT (editor->priv->fill_key_combo),
                                  "changed",
                                  G_CALLBACK (gl_object_editor_changed_cb),
                                  G_OBJECT (editor));
@@ -120,14 +120,13 @@ gl_object_editor_set_fill_color (glObjectEditor      *editor,
                                 glColorNode         *color_node)
 {
        GdkColor *gdk_color;
-       gint pos;
 
        gl_debug (DEBUG_EDITOR, "START");
 
        g_signal_handlers_block_by_func (G_OBJECT(editor->priv->fill_color_combo),
                                         G_CALLBACK (gl_object_editor_changed_cb),
                                         editor);
-       g_signal_handlers_block_by_func (G_OBJECT(editor->priv->fill_key_entry),
+       g_signal_handlers_block_by_func (G_OBJECT(editor->priv->fill_key_combo),
                                         G_CALLBACK (gl_object_editor_changed_cb),
                                         editor);
 
@@ -158,20 +157,14 @@ gl_object_editor_set_fill_color (glObjectEditor      *editor,
                gtk_widget_set_sensitive (editor->priv->fill_color_combo, FALSE);
                gtk_widget_set_sensitive (editor->priv->fill_key_combo, TRUE);
                
-               gtk_editable_delete_text (GTK_EDITABLE (editor->priv->fill_key_entry), 0, -1);
-               pos = 0;
-               if (color_node->key != NULL ) {
-                       gtk_editable_insert_text (GTK_EDITABLE (editor->priv->fill_key_entry),
-                                                                       color_node->key,
-                                                                       strlen (color_node->key),
-                                                                       &pos);
-               }
+               gl_util_combo_box_set_active_text (GTK_COMBO_BOX (editor->priv->fill_key_combo),
+                                                  color_node->key);
        }
        
        g_signal_handlers_unblock_by_func (G_OBJECT(editor->priv->fill_color_combo),
                                           G_CALLBACK (gl_object_editor_changed_cb),
                                           editor);
-       g_signal_handlers_unblock_by_func (G_OBJECT(editor->priv->fill_key_entry),
+       g_signal_handlers_unblock_by_func (G_OBJECT(editor->priv->fill_key_combo),
                                           G_CALLBACK (gl_object_editor_changed_cb),
                                           editor);
 
@@ -195,7 +188,7 @@ gl_object_editor_get_fill_color (glObjectEditor      *editor)
        if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->fill_key_radio))) {
                color_node->field_flag = TRUE;
                color_node->key = 
-                       gtk_editable_get_chars (GTK_EDITABLE (editor->priv->fill_key_entry), 0, -1);
+                       gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->fill_key_combo));
     } else {
                color_node->field_flag = FALSE;
                color_node->key = NULL;
index 114e29e4264e832589aa85921f934c278247c398..d810604ef99700c826fdbd95f4871d3831e22001 100644 (file)
@@ -26,7 +26,7 @@
 #include <glib/gi18n.h>
 #include <gtk/gtkimage.h>
 #include <gtk/gtkfilechooserbutton.h>
-#include <gtk/gtkeditable.h>
+#include <gtk/gtkcombobox.h>
 #include <gtk/gtktogglebutton.h>
 #include <math.h>
 
@@ -84,8 +84,8 @@ gl_object_editor_prepare_image_page (glObjectEditor *editor)
                                                               "img_file_button");
        editor->priv->img_key_combo    = glade_xml_get_widget (editor->priv->gui,
                                                               "img_key_combo");
-       editor->priv->img_key_entry    = glade_xml_get_widget (editor->priv->gui,
-                                                              "img_key_entry");
+
+       gl_util_combo_box_add_text_model ( GTK_COMBO_BOX(editor->priv->img_key_combo));
 
        /* Modify file button properties. */
        add_image_filters_to_chooser (GTK_FILE_CHOOSER (editor->priv->img_file_button));
@@ -103,7 +103,7 @@ gl_object_editor_prepare_image_page (glObjectEditor *editor)
                                  "selection-changed",
                                  G_CALLBACK (gl_object_editor_changed_cb),
                                  G_OBJECT (editor));
-       g_signal_connect_swapped (G_OBJECT (editor->priv->img_key_entry),
+       g_signal_connect_swapped (G_OBJECT (editor->priv->img_key_combo),
                                  "changed",
                                  G_CALLBACK (gl_object_editor_changed_cb),
                                  G_OBJECT (editor));
@@ -149,14 +149,12 @@ gl_object_editor_set_image (glObjectEditor      *editor,
                            gboolean             merge_flag,
                            glTextNode          *text_node)
 {
-        gint pos;
         gl_debug (DEBUG_EDITOR, "START");
  
        g_signal_handlers_block_by_func (G_OBJECT (editor->priv->img_file_button),
                                         G_CALLBACK (gl_object_editor_changed_cb),
                                         editor);
-       g_signal_handlers_block_by_func (G_OBJECT (editor->priv->img_key_entry),
+       g_signal_handlers_block_by_func (G_OBJECT (editor->priv->img_key_combo),
                                         G_CALLBACK (gl_object_editor_changed_cb),
                                         editor);
 
@@ -183,18 +181,14 @@ gl_object_editor_set_image (glObjectEditor      *editor,
                 gtk_widget_set_sensitive (editor->priv->img_file_button, FALSE);
                 gtk_widget_set_sensitive (editor->priv->img_key_combo, TRUE);
                                                                                 
-                gtk_editable_delete_text (GTK_EDITABLE (editor->priv->img_key_entry), 0, -1);
-                pos = 0;
-                gtk_editable_insert_text (GTK_EDITABLE (editor->priv->img_key_entry),
-                                          text_node->data,
-                                          strlen (text_node->data),
-                                          &pos);
+               gl_util_combo_box_set_active_text (GTK_COMBO_BOX (editor->priv->img_key_combo),
+                                                  text_node->data);
         }
                                                                                 
        g_signal_handlers_unblock_by_func (G_OBJECT (editor->priv->img_file_button),
                                           G_CALLBACK (gl_object_editor_changed_cb),
                                           editor);
-       g_signal_handlers_unblock_by_func (G_OBJECT (editor->priv->img_key_entry),
+       g_signal_handlers_unblock_by_func (G_OBJECT (editor->priv->img_key_combo),
                                           G_CALLBACK (gl_object_editor_changed_cb),
                                           editor);
                                                                                 
@@ -220,8 +214,7 @@ gl_object_editor_get_image (glObjectEditor      *editor)
         } else {
                 text_node->field_flag = TRUE;
                 text_node->data =
-                    gtk_editable_get_chars (GTK_EDITABLE (editor->priv->img_key_entry),
-                                            0, -1);
+                       gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->img_key_combo));
         }
  
        gl_debug (DEBUG_EDITOR, "text_node: field_flag=%d, data=%s",
index 5e03bece93f9cdef0003335a39c234e7444b95e0..e1aa2831f3cd7cb66598ed02b4e7729f3baf67aa 100644 (file)
@@ -26,9 +26,8 @@
 #include <glib/gi18n.h>
 #include <gtk/gtklabel.h>
 #include <gtk/gtkspinbutton.h>
-#include <gtk/gtkcombo.h>
+#include <gtk/gtkcombobox.h>
 #include <gtk/gtktogglebutton.h>
-#include <gtk/gtkeditable.h>
 #include <math.h>
 
 #include "prefs.h"
@@ -76,13 +75,13 @@ gl_object_editor_prepare_line_page (glObjectEditor *editor)
                                                               "line_color_combo");
        editor->priv->line_key_combo = glade_xml_get_widget (editor->priv->gui,
                                                                "line_key_combo");      
-       editor->priv->line_key_entry = glade_xml_get_widget (editor->priv->gui,
-                                                               "line_key_entry");      
        editor->priv->line_key_radio = glade_xml_get_widget (editor->priv->gui,
                                                                "line_key_radio");      
        editor->priv->line_color_radio = glade_xml_get_widget (editor->priv->gui,
                                                                "line_color_radio");    
 
+       gl_util_combo_box_add_text_model ( GTK_COMBO_BOX(editor->priv->line_key_combo));
+
        /* Modify widgets based on configuration */
        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->line_color_radio), TRUE);
        gtk_widget_set_sensitive (editor->priv->line_color_combo, TRUE);
@@ -105,7 +104,7 @@ gl_object_editor_prepare_line_page (glObjectEditor *editor)
                                  "color_changed",
                                  G_CALLBACK (gl_object_editor_changed_cb),
                                  G_OBJECT (editor));
-       g_signal_connect_swapped (G_OBJECT (editor->priv->line_key_entry),
+       g_signal_connect_swapped (G_OBJECT (editor->priv->line_key_combo),
                                  "changed",
                                  G_CALLBACK (gl_object_editor_changed_cb),
                                  G_OBJECT (editor));
@@ -171,7 +170,6 @@ gl_object_editor_set_line_color (glObjectEditor      *editor,
                                 glColorNode         *color_node)
 {
        GdkColor *gdk_color;
-       gint pos;
 
        gl_debug (DEBUG_EDITOR, "START");
 
@@ -179,7 +177,7 @@ gl_object_editor_set_line_color (glObjectEditor      *editor,
                                         gl_object_editor_changed_cb,
                                         editor);
 
-       g_signal_handlers_block_by_func (G_OBJECT(editor->priv->line_key_entry),
+       g_signal_handlers_block_by_func (G_OBJECT(editor->priv->line_key_combo),
                                         G_CALLBACK (gl_object_editor_changed_cb),
                                         editor);
 
@@ -211,20 +209,14 @@ gl_object_editor_set_line_color (glObjectEditor      *editor,
                gtk_widget_set_sensitive (editor->priv->line_color_combo, FALSE);
                gtk_widget_set_sensitive (editor->priv->line_key_combo, TRUE);
                
-               gtk_editable_delete_text (GTK_EDITABLE (editor->priv->line_key_entry), 0, -1);
-               pos = 0;
-               if (color_node->key != NULL ) {
-                       gtk_editable_insert_text (GTK_EDITABLE (editor->priv->line_key_entry),
-                                                                       color_node->key,
-                                                                       strlen (color_node->key),
-                                                                       &pos);
-               }
+               gl_util_combo_box_set_active_text (GTK_COMBO_BOX (editor->priv->line_key_combo),
+                                                  color_node->key);
        }
 
        g_signal_handlers_unblock_by_func (G_OBJECT(editor->priv->line_color_combo),
                                           gl_object_editor_changed_cb,
                                           editor);
-       g_signal_handlers_unblock_by_func (G_OBJECT(editor->priv->line_key_entry),
+       g_signal_handlers_unblock_by_func (G_OBJECT(editor->priv->line_key_combo),
                                           gl_object_editor_changed_cb,
                                           editor);     
 
@@ -248,7 +240,7 @@ gl_object_editor_get_line_color (glObjectEditor      *editor)
        if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->line_key_radio))) {
                color_node->field_flag = TRUE;
                color_node->key = 
-                       gtk_editable_get_chars (GTK_EDITABLE (editor->priv->line_key_entry), 0, -1);
+                       gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->line_key_combo));
     } else {
                color_node->field_flag = FALSE;
                color_node->key = NULL;
index b8f4afc2fac3e8352effb06f7c5bad0ad23f6a6e..acb5045cf2b9e7e91adacdeddf9ba8978a1d899d 100644 (file)
@@ -75,7 +75,6 @@ struct _glObjectEditorPrivate {
        GtkWidget  *fill_page_vbox;
        GtkWidget  *fill_color_combo;
        GtkWidget  *fill_key_combo;
-       GtkWidget  *fill_key_entry;
        GtkWidget  *fill_key_radio;
        GtkWidget  *fill_color_radio;
 
@@ -85,17 +84,14 @@ struct _glObjectEditorPrivate {
        GtkWidget  *line_color_combo;
        GtkWidget  *line_key_radio;
        GtkWidget  *line_key_combo;
-       GtkWidget  *line_key_entry;
 
        GtkWidget  *img_page_vbox;
        GtkWidget  *img_file_radio;
        GtkWidget  *img_key_radio;
        GtkWidget  *img_file_button;
        GtkWidget  *img_key_combo;
-       GtkWidget  *img_key_entry;
 
        GtkWidget  *text_page_vbox;
-       GtkWidget  *text_family_entry;
        GtkWidget  *text_family_combo;
        GtkWidget  *text_size_spin;
        GtkWidget  *text_bold_toggle;
@@ -104,7 +100,6 @@ struct _glObjectEditorPrivate {
        GtkWidget  *text_color_combo;
        GtkWidget  *text_color_key_radio;
        GtkWidget  *text_color_key_combo;
-       GtkWidget  *text_color_key_entry;
        GtkWidget  *text_left_toggle;
        GtkWidget  *text_center_toggle;
        GtkWidget  *text_right_toggle;
@@ -114,12 +109,10 @@ struct _glObjectEditorPrivate {
        GtkWidget  *edit_page_vbox;
        GtkWidget  *edit_text_view;
        GtkWidget  *edit_key_label;
-       GtkWidget  *edit_key_entry;
        GtkWidget  *edit_key_combo;
        GtkWidget  *edit_insert_field_button;
 
        GtkWidget  *bc_page_vbox;
-       GtkWidget  *bc_style_entry;
        GtkWidget  *bc_style_combo;
        GtkWidget  *bc_text_check;
        GtkWidget  *bc_cs_check;
@@ -127,13 +120,11 @@ struct _glObjectEditorPrivate {
        GtkWidget  *bc_color_combo;
        GtkWidget  *bc_key_radio;
        GtkWidget  *bc_key_combo;
-       GtkWidget  *bc_key_entry;
 
        GtkWidget  *data_page_vbox;
        GtkWidget  *data_literal_radio;
        GtkWidget  *data_key_radio;
        GtkWidget  *data_text_entry;
-       GtkWidget  *data_key_entry;
        GtkWidget  *data_key_combo;
        GtkWidget  *data_format_label;
        GtkWidget  *data_ex_label;
index c6d3fc5c16d090240deeae9eff04b3177aec159e..ab93283bb160e987da1d9b1dce2d3fcaa8f11791 100644 (file)
@@ -26,8 +26,7 @@
 #include <glib/gi18n.h>
 #include <gtk/gtktogglebutton.h>
 #include <gtk/gtkspinbutton.h>
-#include <gtk/gtkcombo.h>
-#include <gtk/gtkeditable.h>
+#include <gtk/gtkcombobox.h>
 #include <math.h>
 
 #include "prefs.h"
@@ -72,8 +71,6 @@ gl_object_editor_prepare_text_page (glObjectEditor       *editor)
        /* Extract widgets from XML tree. */
        editor->priv->text_page_vbox =
                glade_xml_get_widget (editor->priv->gui, "text_page_vbox");
-       editor->priv->text_family_entry =
-               glade_xml_get_widget (editor->priv->gui, "text_family_entry");
        editor->priv->text_family_combo =
                glade_xml_get_widget (editor->priv->gui, "text_family_combo");
        editor->priv->text_size_spin =
@@ -90,8 +87,6 @@ gl_object_editor_prepare_text_page (glObjectEditor       *editor)
                glade_xml_get_widget (editor->priv->gui, "text_color_key_radio");
        editor->priv->text_color_key_combo =
                glade_xml_get_widget (editor->priv->gui, "text_color_key_combo");
-       editor->priv->text_color_key_entry =
-               glade_xml_get_widget (editor->priv->gui, "text_color_key_entry");
        editor->priv->text_left_toggle =
                glade_xml_get_widget (editor->priv->gui, "text_left_toggle");
        editor->priv->text_center_toggle =
@@ -103,9 +98,12 @@ gl_object_editor_prepare_text_page (glObjectEditor       *editor)
        editor->priv->text_auto_shrink_check =
                glade_xml_get_widget (editor->priv->gui, "text_auto_shrink_check");
 
+       gl_util_combo_box_add_text_model ( GTK_COMBO_BOX(editor->priv->text_family_combo));
+       gl_util_combo_box_add_text_model ( GTK_COMBO_BOX(editor->priv->text_color_key_combo));
+
        /* Load family names */
        family_names = gnome_font_family_list ();
-       gtk_combo_set_popdown_strings (GTK_COMBO(editor->priv->text_family_combo),
+       gl_util_combo_box_set_strings (GTK_COMBO_BOX(editor->priv->text_family_combo),
                                       family_names);
        gnome_font_family_list_free (family_names);
 
@@ -118,7 +116,7 @@ gl_object_editor_prepare_text_page (glObjectEditor       *editor)
        gtk_widget_show_all (editor->priv->text_page_vbox);
 
        /* Connect signals */
-       g_signal_connect_swapped (G_OBJECT (editor->priv->text_family_entry),
+       g_signal_connect_swapped (G_OBJECT (editor->priv->text_family_combo),
                                  "changed",
                                  G_CALLBACK (gl_object_editor_changed_cb),
                                  G_OBJECT (editor));
@@ -138,7 +136,7 @@ gl_object_editor_prepare_text_page (glObjectEditor       *editor)
                                  "color_changed",
                                  G_CALLBACK (gl_object_editor_changed_cb),
                                  G_OBJECT (editor));
-       g_signal_connect_swapped (G_OBJECT (editor->priv->text_color_key_entry),
+       g_signal_connect_swapped (G_OBJECT (editor->priv->text_color_key_combo),
                                  "changed",
                                  G_CALLBACK (gl_object_editor_changed_cb),
                                  G_OBJECT (editor));
@@ -229,7 +227,7 @@ gl_object_editor_set_font_family (glObjectEditor      *editor,
 
        gl_debug (DEBUG_EDITOR, "START");
 
-       g_signal_handlers_block_by_func (G_OBJECT(editor->priv->text_family_entry),
+       g_signal_handlers_block_by_func (G_OBJECT(editor->priv->text_family_combo),
                                         gl_object_editor_changed_cb,
                                         editor);
 
@@ -245,10 +243,10 @@ gl_object_editor_set_font_family (glObjectEditor      *editor,
                 }
         }
         gnome_font_family_list_free (family_names);
-        gtk_entry_set_text (GTK_ENTRY (editor->priv->text_family_entry), good_font_family);
+        gl_util_combo_box_set_active_text (GTK_COMBO_BOX (editor->priv->text_family_combo), good_font_family);
         g_free (good_font_family);
 
-       g_signal_handlers_unblock_by_func (G_OBJECT(editor->priv->text_family_entry),
+       g_signal_handlers_unblock_by_func (G_OBJECT(editor->priv->text_family_combo),
                                           gl_object_editor_changed_cb,
                                           editor);
 
@@ -265,9 +263,7 @@ gl_object_editor_get_font_family (glObjectEditor      *editor)
 
        gl_debug (DEBUG_EDITOR, "START");
 
-       font_family =
-               gtk_editable_get_chars (GTK_EDITABLE (editor->priv->text_family_entry),
-                                       0, -1);
+       font_family = gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->text_family_combo));
 
        gl_debug (DEBUG_EDITOR, "END");
 
@@ -488,7 +484,7 @@ gl_object_editor_set_text_color (glObjectEditor      *editor,
        g_signal_handlers_block_by_func (G_OBJECT(editor->priv->text_color_combo),
                                         gl_object_editor_changed_cb,
                                         editor);
-       g_signal_handlers_block_by_func (G_OBJECT(editor->priv->text_color_key_entry),
+       g_signal_handlers_block_by_func (G_OBJECT(editor->priv->text_color_key_combo),
                                         gl_object_editor_changed_cb,
                                         editor);
 
@@ -520,22 +516,15 @@ gl_object_editor_set_text_color (glObjectEditor      *editor,
                gtk_widget_set_sensitive (editor->priv->text_color_combo, FALSE);
                gtk_widget_set_sensitive (editor->priv->text_color_key_combo, TRUE);
                
-               gtk_editable_delete_text (GTK_EDITABLE (editor->priv->text_color_key_entry), 0, -1);
-               pos = 0;
                gl_debug (DEBUG_EDITOR, "color field true 1");
-               if (text_color_node->key != NULL ) {
-                       gtk_editable_insert_text (GTK_EDITABLE (editor->priv->text_color_key_entry),
-                                                                       text_color_node->key,
-                                                                       strlen (text_color_node->key),
-                                                                       &pos);
-               }
+               gl_util_combo_box_set_active_text (GTK_COMBO_BOX (editor->priv->text_color_key_combo));
                gl_debug (DEBUG_EDITOR, "color field true 2");
        }
 
        g_signal_handlers_unblock_by_func (G_OBJECT(editor->priv->text_color_combo),
                                           gl_object_editor_changed_cb,
                                           editor);
-       g_signal_handlers_unblock_by_func (G_OBJECT(editor->priv->text_color_key_entry),
+       g_signal_handlers_unblock_by_func (G_OBJECT(editor->priv->text_color_key_combo),
                                           gl_object_editor_changed_cb,
                                           editor);
 
@@ -560,7 +549,7 @@ gl_object_editor_get_text_color (glObjectEditor      *editor)
                color_node->field_flag = TRUE;
                color_node->color = gl_prefs->default_text_color;
                color_node->key = 
-                       gtk_editable_get_chars (GTK_EDITABLE (editor->priv->text_color_key_entry), 0, -1);
+                       gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->text_color_key_combo));
     } else {
                color_node->field_flag = FALSE;
                color_node->key = NULL;
index 107428f20ac87b4e0430631f164230bdaed9cc88..cfc67c759fa732e95e955861d6c2dcbffc3d81d0 100644 (file)
@@ -27,7 +27,7 @@
 #include <glade/glade-xml.h>
 #include <gtk/gtklabel.h>
 #include <gtk/gtknotebook.h>
-#include <gtk/gtkcombo.h>
+#include <gtk/gtkcombobox.h>
 #include <gtk/gtktogglebutton.h>
 
 #include <math.h>
@@ -489,37 +489,37 @@ gl_object_editor_set_key_names (glObjectEditor      *editor,
 
                combo = editor->priv->img_key_combo;
                if (combo) {
-                       gtk_combo_set_popdown_strings (GTK_COMBO (combo), keys);
+                       gl_util_combo_box_set_strings (GTK_COMBO_BOX (combo), keys);
                }
 
                combo = editor->priv->edit_key_combo;
                if (combo) {
-                       gtk_combo_set_popdown_strings (GTK_COMBO (combo), keys);
+                       gl_util_combo_box_set_strings (GTK_COMBO_BOX (combo), keys);
                }
 
                combo = editor->priv->data_key_combo;
                if (combo) {
-                       gtk_combo_set_popdown_strings (GTK_COMBO (combo), keys);
+                       gl_util_combo_box_set_strings (GTK_COMBO_BOX (combo), keys);
                }
                
                combo = editor->priv->fill_key_combo;
                if (combo) {
-                       gtk_combo_set_popdown_strings (GTK_COMBO (combo), keys);
+                       gl_util_combo_box_set_strings (GTK_COMBO_BOX (combo), keys);
                }
 
                combo = editor->priv->text_color_key_combo;
                if (combo) {
-                       gtk_combo_set_popdown_strings (GTK_COMBO (combo), keys);
+                       gl_util_combo_box_set_strings (GTK_COMBO_BOX (combo), keys);
                }
 
                combo = editor->priv->line_key_combo;
                if (combo) {
-                       gtk_combo_set_popdown_strings (GTK_COMBO (combo), keys);
+                       gl_util_combo_box_set_strings (GTK_COMBO_BOX (combo), keys);
                }
                
                combo = editor->priv->bc_key_combo;
                if (combo) {
-                       gtk_combo_set_popdown_strings (GTK_COMBO (combo), keys);
+                       gl_util_combo_box_set_strings (GTK_COMBO_BOX (combo), keys);
                }
                
                 gl_merge_free_key_list (&keys);
@@ -529,37 +529,37 @@ gl_object_editor_set_key_names (glObjectEditor      *editor,
 
                combo = editor->priv->img_key_combo;
                if (combo) {
-                       gtk_combo_set_popdown_strings (GTK_COMBO (combo), keys);
+                       gl_util_combo_box_set_strings (GTK_COMBO_BOX (combo), keys);
                }
 
                combo = editor->priv->edit_key_combo;
                if (combo) {
-                       gtk_combo_set_popdown_strings (GTK_COMBO (combo), keys);
+                       gl_util_combo_box_set_strings (GTK_COMBO_BOX (combo), keys);
                }
                
                combo = editor->priv->data_key_combo;
                if (combo) {
-                       gtk_combo_set_popdown_strings (GTK_COMBO (combo), keys);
+                       gl_util_combo_box_set_strings (GTK_COMBO_BOX (combo), keys);
                }
                
                combo = editor->priv->fill_key_combo;
                if (combo) {
-                       gtk_combo_set_popdown_strings (GTK_COMBO (combo), keys);
+                       gl_util_combo_box_set_strings (GTK_COMBO_BOX (combo), keys);
                }
                
                combo = editor->priv->text_color_key_combo;
                if (combo) {
-                       gtk_combo_set_popdown_strings (GTK_COMBO (combo), keys);
+                       gl_util_combo_box_set_strings (GTK_COMBO_BOX (combo), keys);
                }
 
                combo = editor->priv->line_key_combo;
                if (combo) {
-                       gtk_combo_set_popdown_strings (GTK_COMBO (combo), keys);
+                       gl_util_combo_box_set_strings (GTK_COMBO_BOX (combo), keys);
                }
                
                combo = editor->priv->bc_key_combo;
                if (combo) {
-                       gtk_combo_set_popdown_strings (GTK_COMBO (combo), keys);
+                       gl_util_combo_box_set_strings (GTK_COMBO_BOX (combo), keys);
                }
                
                 g_list_free (keys);
index 6ee0324a76e8b0e557202bd563b0539ff2c3a199..2549c1b10a7ac739dc8ba2af1ae5e2d185aa6f5d 100644 (file)
@@ -37,7 +37,7 @@
 /* Private macros and constants.                                              */
 /*============================================================================*/
 
-#define DEFAULT_SIDEBAR_WIDTH 320
+#define DEFAULT_SIDEBAR_WIDTH 340
 
 /*============================================================================*/
 /* Private globals                                                            */