]> git.sur5r.net Git - glabels/commitdiff
2005-04-03 Jim Evins <evins@snaught.com>
authorJim Evins <evins@snaught.com>
Mon, 4 Apr 2005 01:41:35 +0000 (01:41 +0000)
committerJim Evins <evins@snaught.com>
Mon, 4 Apr 2005 01:41:35 +0000 (01:41 +0000)
* src/Makefile.am:
* src/wdgt-image-select.h:
* src/wdgt-image-select.c:
Removed obsolete wdgt-image-select.[ch] files.
* libglabels/paper.c: (gl_paper_dup):
Fixed rename of parameter introduced during documentation
updates.
* data/glade/object-editor.glade:
* src/object-editor-image-page.c:
(gl_object_editor_prepare_image_page), (img_radio_toggled_cb),
(gl_object_editor_set_image), (gl_object_editor_get_image),
(update_preview_cb), (add_image_filters_to_chooser):
* src/object-editor-private.h:
Replaced deprecated GnomePixmapEntry with
GtkFileChooserButton.

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

glabels2/ChangeLog
glabels2/data/glade/object-editor.glade
glabels2/libglabels/paper.c
glabels2/src/Makefile.am
glabels2/src/object-editor-image-page.c
glabels2/src/object-editor-private.h
glabels2/src/wdgt-image-select.c [deleted file]
glabels2/src/wdgt-image-select.h [deleted file]

index 400740415e7c0dc8a591395c8452f1d71e79459d..2da805c4d1a82a110f976616d0181e59d99e8e59 100644 (file)
@@ -1,3 +1,21 @@
+2005-04-03  Jim Evins <evins@snaught.com>
+
+       * src/Makefile.am:
+       * src/wdgt-image-select.h:
+       * src/wdgt-image-select.c:
+               Removed obsolete wdgt-image-select.[ch] files.
+       * libglabels/paper.c: (gl_paper_dup):
+               Fixed rename of parameter introduced during documentation
+               updates.
+       * data/glade/object-editor.glade:
+       * src/object-editor-image-page.c:
+       (gl_object_editor_prepare_image_page), (img_radio_toggled_cb),
+       (gl_object_editor_set_image), (gl_object_editor_get_image),
+       (update_preview_cb), (add_image_filters_to_chooser):
+       * src/object-editor-private.h:
+               Replaced deprecated GnomePixmapEntry with
+               GtkFileChooserButton.
+
 2005-04-02  Jim Evins <evins@snaught.com>
 
        * src/mygal/mygal-combo-box.c: (deactivate_arrow),
index cffea583d83fb0b3293bcb44552de1fda0c120e5..f9bb0579d831e971f227ed6f42cf3d3c39e0e6be 100644 (file)
@@ -18,6 +18,7 @@
   <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">
                  <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="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="invisible_char">*</property>
                              <property name="activates_default">False</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="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="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="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="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="invisible_char">*</property>
                                  <property name="activates_default">False</property>
                                </widget>
                              </child>
                            <widget class="GtkSpinButton" id="text_size_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">0</property>
                              <property name="numeric">True</property>
                              <property name="update_policy">GTK_UPDATE_ALWAYS</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="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="invisible_char">*</property>
                                          <property name="activates_default">False</property>
                                        </widget>
                                      </child>
                          <property name="wrap">False</property>
                          <property name="selectable">False</property>
                          <property name="xalign">0</property>
-                         <property name="yalign">0.14</property>
+                         <property name="yalign">0.140000000596</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">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="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="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="invisible_char">*</property>
                                          <property name="activates_default">False</property>
                                        </widget>
                                      </child>
                          <property name="wrap">False</property>
                          <property name="selectable">False</property>
                          <property name="xalign">0</property>
-                         <property name="yalign">0.14</property>
+                         <property name="yalign">0.140000000596</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">tab</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="invisible_char">*</property>
                                          <property name="activates_default">False</property>
                                        </widget>
                                      </child>
                          <property name="wrap">False</property>
                          <property name="selectable">False</property>
                          <property name="xalign">0</property>
-                         <property name="yalign">0.14</property>
+                         <property name="yalign">0.140000000596</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">tab</property>
                  <property name="spacing">12</property>
 
                  <child>
-                   <widget class="GtkHBox" id="hbox16">
+                   <widget class="GtkTable" id="table10">
                      <property name="visible">True</property>
+                     <property name="n_rows">2</property>
+                     <property name="n_columns">2</property>
                      <property name="homogeneous">False</property>
-                     <property name="spacing">12</property>
+                     <property name="row_spacing">12</property>
+                     <property name="column_spacing">6</property>
 
                      <child>
                        <widget class="GtkRadioButton" id="img_file_radio">
                          <property name="draw_indicator">True</property>
                        </widget>
                        <packing>
-                         <property name="padding">0</property>
-                         <property name="expand">False</property>
-                         <property name="fill">False</property>
+                         <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>
-                   </widget>
-                   <packing>
-                     <property name="padding">0</property>
-                     <property name="expand">False</property>
-                     <property name="fill">False</property>
-                   </packing>
-                 </child>
-
-                 <child>
-                   <widget class="GnomePixmapEntry" id="img_pixmap_entry">
-                     <property name="visible">True</property>
-                     <property name="history_id">image</property>
-                     <property name="max_saved">10</property>
-                     <property name="browse_dialog_title" translatable="yes">Load image</property>
-                     <property name="modal">False</property>
-                     <property name="do_preview">True</property>
-                     <property name="use_filechooser">False</property>
-
-                     <child internal-child="entry">
-                       <widget class="GtkEntry" id="combo-entry3">
-                         <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>
-                   </widget>
-                   <packing>
-                     <property name="padding">0</property>
-                     <property name="expand">False</property>
-                     <property name="fill">False</property>
-                   </packing>
-                 </child>
-
-                 <child>
-                   <widget class="GtkHSeparator" id="hseparator1">
-                     <property name="visible">True</property>
-                   </widget>
-                   <packing>
-                     <property name="padding">0</property>
-                     <property name="expand">True</property>
-                     <property name="fill">True</property>
-                   </packing>
-                 </child>
-
-                 <child>
-                   <widget class="GtkHBox" id="hbox17">
-                     <property name="visible">True</property>
-                     <property name="homogeneous">False</property>
-                     <property name="spacing">12</property>
 
                      <child>
                        <widget class="GtkRadioButton" id="img_key_radio">
                          <property name="group">img_file_radio</property>
                        </widget>
                        <packing>
-                         <property name="padding">0</property>
-                         <property name="expand">False</property>
-                         <property name="fill">False</property>
+                         <property name="left_attach">0</property>
+                         <property name="right_attach">1</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>
 
                              <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="invisible_char">*</property>
                              <property name="activates_default">False</property>
                            </widget>
                          </child>
                          </child>
                        </widget>
                        <packing>
-                         <property name="padding">0</property>
-                         <property name="expand">False</property>
-                         <property name="fill">False</property>
+                         <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="title" translatable="yes">Select A File</property>
+                         <property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property>
+                         <property name="local_only">True</property>
+                         <property name="show_hidden">False</property>
+                         <property name="width_chars">-1</property>
+                       </widget>
+                       <packing>
+                         <property name="left_attach">1</property>
+                         <property name="right_attach">2</property>
+                         <property name="top_attach">0</property>
+                         <property name="bottom_attach">1</property>
+                         <property name="x_options">fill</property>
+                         <property name="y_options">fill</property>
                        </packing>
                      </child>
                    </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="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="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="invisible_char">*</property>
                              <property name="activates_default">False</property>
                            </widget>
                            <packing>
                                  <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="invisible_char">*</property>
                                  <property name="activates_default">False</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="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">1</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">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="left_attach">0</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="invisible_char">*</property>
                                  <property name="activates_default">False</property>
                                </widget>
                              </child>
                                          <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="invisible_char">*</property>
                                          <property name="activates_default">False</property>
                                        </widget>
                                      </child>
                          <property name="wrap">False</property>
                          <property name="selectable">False</property>
                          <property name="xalign">0</property>
-                         <property name="yalign">0.14</property>
+                         <property name="yalign">0.140000000596</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">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="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="size_h_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>
                            <widget class="GtkSpinButton" id="size_w_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">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="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="lsize_r_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>
                            <widget class="GtkSpinButton" id="lsize_theta_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">1</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">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="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">2</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">2</property>
                        <widget class="GtkSpinButton" id="pos_x_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>
                        <widget class="GtkSpinButton" id="pos_y_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="type">tab</property>
index fd005d54927968e6a9455c8a9e4d459c151e3c04..5145e77d7f18dbe5d960bfff9f1ed8c953498cb3 100644 (file)
@@ -117,14 +117,14 @@ glPaper *gl_paper_dup (const glPaper *orig)
 {
        glPaper       *paper;
 
-       g_return_val_if_fail (orig_paper, NULL);
+       g_return_val_if_fail (orig, NULL);
 
        paper = g_new0 (glPaper,1);
 
-       paper->id     = g_strdup (orig_paper->id);
-       paper->name   = g_strdup (orig_paper->name);
-       paper->width  = orig_paper->width;
-       paper->height = orig_paper->height;
+       paper->id     = g_strdup (orig->id);
+       paper->name   = g_strdup (orig->name);
+       paper->width  = orig->width;
+       paper->height = orig->height;
 
        return paper;
 }
index d23bc4e862767cf55d4431dd4c0940400a6bb3cf..106d39b2c6e440af71ab1f16254ef30d07f71290 100644 (file)
@@ -153,8 +153,6 @@ glabels_SOURCES =                   \
        merge-text.h                    \
        text-node.c                     \
        text-node.h                     \
-       wdgt-image-select.c             \
-       wdgt-image-select.h             \
        wdgt-print-copies.c             \
        wdgt-print-copies.h             \
        wdgt-print-merge.c              \
index 4464fab759a2326c5bd7909e110eec1ccb9b0740..e9704839364f22b54473654296b8cad2267487e4 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <gnome.h>
 #include <math.h>
+#include <gtk/gtkimage.h>
 
 #include "object-editor.h"
 #include "prefs.h"
 
 static void img_radio_toggled_cb                (glObjectEditor        *editor);
 
+static void update_preview_cb                   (GtkFileChooser *file_chooser,
+                                                gpointer        data);
+static void add_image_filters_to_chooser        (GtkFileChooser *file_chooser);
+
 
 \f
 /*--------------------------------------------------------------------------*/
@@ -57,8 +62,10 @@ static void img_radio_toggled_cb                (glObjectEditor        *editor);
 void
 gl_object_editor_prepare_image_page (glObjectEditor *editor)
 {
-       GdkColor     *gdk_color;
-       GtkWidget    *ge;
+       GdkColor      *gdk_color;
+       GtkFileFilter *filter;
+       GtkWidget     *preview;
+
 
        gl_debug (DEBUG_EDITOR, "START");
 
@@ -69,20 +76,27 @@ gl_object_editor_prepare_image_page (glObjectEditor *editor)
                                                               "img_file_radio");
        editor->priv->img_key_radio    = glade_xml_get_widget (editor->priv->gui,
                                                               "img_key_radio");
-       editor->priv->img_pixmap_entry = glade_xml_get_widget (editor->priv->gui,
-                                                             "img_pixmap_entry");
+       editor->priv->img_file_button  = glade_xml_get_widget (editor->priv->gui,
+                                                              "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");
 
+       /* Modify file button properties. */
+       add_image_filters_to_chooser (GTK_FILE_CHOOSER (editor->priv->img_file_button));
+       preview = gtk_image_new ();
+       gtk_file_chooser_set_preview_widget (GTK_FILE_CHOOSER (editor->priv->img_file_button), preview);
+       g_signal_connect (G_OBJECT (editor->priv->img_file_button),
+                         "update-preview",
+                         G_CALLBACK (update_preview_cb), preview);
+
        /* Un-hide */
        gtk_widget_show_all (editor->priv->img_page_vbox);
 
        /* Connect signals */
-       ge = gnome_file_entry_gtk_entry(GNOME_FILE_ENTRY(editor->priv->img_pixmap_entry));
-       g_signal_connect_swapped (G_OBJECT (ge),
-                                 "changed",
+       g_signal_connect_swapped (G_OBJECT (editor->priv->img_file_button),
+                                 "selection-changed",
                                  G_CALLBACK (gl_object_editor_changed_cb),
                                  G_OBJECT (editor));
        g_signal_connect_swapped (G_OBJECT (editor->priv->img_key_entry),
@@ -110,10 +124,10 @@ img_radio_toggled_cb (glObjectEditor *editor)
         gl_debug (DEBUG_WDGT, "START");
  
        if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->img_file_radio))) {
-                gtk_widget_set_sensitive (editor->priv->img_pixmap_entry, TRUE);
+                gtk_widget_set_sensitive (editor->priv->img_file_button, TRUE);
                 gtk_widget_set_sensitive (editor->priv->img_key_combo, FALSE);
         } else {
-                gtk_widget_set_sensitive (editor->priv->img_pixmap_entry, FALSE);
+                gtk_widget_set_sensitive (editor->priv->img_file_button, FALSE);
                 gtk_widget_set_sensitive (editor->priv->img_key_combo, TRUE);
         }
  
@@ -135,7 +149,7 @@ gl_object_editor_set_image (glObjectEditor      *editor,
  
         gl_debug (DEBUG_EDITOR, "START");
  
-       g_signal_handlers_block_by_func (G_OBJECT (editor->priv->img_pixmap_entry),
+       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),
@@ -148,22 +162,21 @@ gl_object_editor_set_image (glObjectEditor      *editor,
  
                 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
                                               (editor->priv->img_file_radio), TRUE); 
-                gtk_widget_set_sensitive (editor->priv->img_pixmap_entry, TRUE);
+                gtk_widget_set_sensitive (editor->priv->img_file_button, TRUE);
                 gtk_widget_set_sensitive (editor->priv->img_key_combo, FALSE);
  
                 if (text_node->data != NULL ) {
-                        gnome_file_entry_set_filename (GNOME_FILE_ENTRY(editor->priv->img_pixmap_entry),
+                       gtk_file_chooser_set_filename (GTK_FILE_CHOOSER(editor->priv->img_file_button),
                                                        text_node->data);
                 } else {
-                        gnome_file_entry_set_filename (GNOME_FILE_ENTRY(editor->priv->img_pixmap_entry),
-                                                       "");
+                       gtk_file_chooser_unselect_all (GTK_FILE_CHOOSER(editor->priv->img_file_button));
                 }
         } else {
                                                                                 
                 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
                                               (editor->priv->img_key_radio), TRUE);
                                                                                 
-                gtk_widget_set_sensitive (editor->priv->img_pixmap_entry, FALSE);
+                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);
@@ -174,7 +187,7 @@ gl_object_editor_set_image (glObjectEditor      *editor,
                                           &pos);
         }
                                                                                 
-       g_signal_handlers_unblock_by_func (G_OBJECT (editor->priv->img_pixmap_entry),
+       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),
@@ -199,7 +212,7 @@ gl_object_editor_get_image (glObjectEditor      *editor)
         if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->img_file_radio))) {
                 text_node->field_flag = FALSE;
                 text_node->data =
-                        gnome_pixmap_entry_get_filename (GNOME_PIXMAP_ENTRY(editor->priv->img_pixmap_entry));
+                       gtk_file_chooser_get_filename (GTK_FILE_CHOOSER(editor->priv->img_file_button));
         } else {
                 text_node->field_flag = TRUE;
                 text_node->data =
@@ -215,3 +228,105 @@ gl_object_editor_get_image (glObjectEditor      *editor)
         return text_node;
 }
 
+/*--------------------------------------------------------------------------*/
+/* PRIVATE.  Update preview image.                                          */
+/*--------------------------------------------------------------------------*/
+static void
+update_preview_cb (GtkFileChooser *file_chooser, gpointer data)
+{
+  GtkWidget *preview;
+  char *filename;
+  GdkPixbuf *pixbuf;
+  gboolean have_preview;
+
+  preview = GTK_WIDGET (data);
+  filename = gtk_file_chooser_get_preview_filename (file_chooser);
+
+  if (filename) {
+         pixbuf = gdk_pixbuf_new_from_file_at_size (filename, 128, 128, NULL);
+         have_preview = (pixbuf != NULL);
+         g_free (filename);
+
+         gtk_image_set_from_pixbuf (GTK_IMAGE (preview), pixbuf);
+         if (pixbuf)
+                 gdk_pixbuf_unref (pixbuf);
+
+         gtk_file_chooser_set_preview_widget_active (file_chooser,
+                                                     have_preview);
+  } else {
+         gtk_file_chooser_set_preview_widget_active (file_chooser, FALSE);
+  }
+}
+
+/*--------------------------------------------------------------------------*/
+/* PRIVATE.  Add filters to file chooser.                                   */
+/*           Based on eog's eog_file_selection_add_filter().                */
+/*--------------------------------------------------------------------------*/
+static void
+add_image_filters_to_chooser (GtkFileChooser *chooser)
+{
+       GtkFileFilter *all_file_filter;
+       GtkFileFilter *all_img_filter;
+       GSList        *formats;
+       GSList        *it;
+       GtkFileFilter *filter;
+       GSList        *filters = NULL;
+       gchar        **mime_types, **pattern, *tmp;
+       int            i;
+
+       /* All Files Filter */
+       all_file_filter = gtk_file_filter_new ();
+       gtk_file_filter_set_name (all_file_filter, _("All Files"));
+       gtk_file_filter_add_pattern (all_file_filter, "*");
+
+       /* All Image Filter */
+       all_img_filter = gtk_file_filter_new ();
+       gtk_file_filter_set_name (all_img_filter, _("All Images"));
+
+       /* Individual image filters */
+       formats = gdk_pixbuf_get_formats ();
+       for (it = formats; it != NULL; it = it->next) {
+               char *filter_name;
+               GdkPixbufFormat *format;
+               filter = gtk_file_filter_new ();
+
+               format = (GdkPixbufFormat*) it->data;
+
+               /* Filter name: First description then file extension, eg. "The PNG-Format (*.png)".*/
+               filter_name = g_strdup_printf (_("%s (*.%s)"), 
+                                              gdk_pixbuf_format_get_description (format),
+                                              gdk_pixbuf_format_get_name (format));
+               gtk_file_filter_set_name (filter, filter_name);
+               g_free (filter_name);
+
+               mime_types = gdk_pixbuf_format_get_mime_types ((GdkPixbufFormat *) it->data);
+               for (i = 0; mime_types[i] != NULL; i++) {
+                       gtk_file_filter_add_mime_type (filter, mime_types[i]);
+                       gtk_file_filter_add_mime_type (all_img_filter, mime_types[i]);
+               }
+               g_strfreev (mime_types);
+               pattern = gdk_pixbuf_format_get_extensions ((GdkPixbufFormat *) it->data);
+               for (i = 0; pattern[i] != NULL; i++) {
+                       tmp = g_strconcat ("*.", pattern[i], NULL);
+                       gtk_file_filter_add_pattern (filter, tmp);
+                       gtk_file_filter_add_pattern (all_img_filter, tmp);
+                       g_free (tmp);
+               }
+               g_strfreev (pattern);
+
+               filters = g_slist_prepend (filters, filter);
+       }
+       g_slist_free (formats);
+
+       /* Add filter to filechooser */
+       gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser), all_file_filter);
+       gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser), all_img_filter);
+       gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (chooser), all_img_filter);
+
+       for (it = filters; it != NULL; it = it->next) {
+               gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser),
+                                            GTK_FILE_FILTER (it->data));
+       }
+       g_slist_free (filters);
+}
index 2338169522200a81f429bb6d3da4f91af6e1e144..4c140318e6e12b101ef4775db32de1341300e76f 100644 (file)
@@ -90,7 +90,7 @@ struct _glObjectEditorPrivate {
        GtkWidget  *img_page_vbox;
        GtkWidget  *img_file_radio;
        GtkWidget  *img_key_radio;
-       GtkWidget  *img_pixmap_entry;
+       GtkWidget  *img_file_button;
        GtkWidget  *img_key_combo;
        GtkWidget  *img_key_entry;
 
diff --git a/glabels2/src/wdgt-image-select.c b/glabels2/src/wdgt-image-select.c
deleted file mode 100644 (file)
index ff50938..0000000
+++ /dev/null
@@ -1,443 +0,0 @@
-/*
- *  (GLABELS) Label and Business Card Creation program for GNOME
- *
- *  wdgt_image_select.c:  image selection widget module
- *
- *  Copyright (C) 2001-2002  Jim Evins <evins@snaught.com>.
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
- */
-
-#include <config.h>
-
-#include <glib/gi18n.h>
-
-#include "wdgt-image-select.h"
-#include "merge.h"
-#include "marshal.h"
-
-#include "debug.h"
-
-/*===========================================*/
-/* Private types                             */
-/*===========================================*/
-
-enum {
-       CHANGED,
-       LAST_SIGNAL
-};
-
-typedef void (*glWdgtImageSelectSignal) (GObject * object, gpointer data);
-
-/*===========================================*/
-/* Private globals                           */
-/*===========================================*/
-
-static glHigVBoxClass *parent_class;
-
-static gint wdgt_image_select_signals[LAST_SIGNAL] = { 0 };
-
-/* Save state of image file entry */
-static gchar *image_path = NULL;
-
-/*===========================================*/
-/* Local function prototypes                 */
-/*===========================================*/
-
-static void gl_wdgt_image_select_class_init    (glWdgtImageSelectClass *class);
-static void gl_wdgt_image_select_instance_init (glWdgtImageSelect      *image_select);
-static void gl_wdgt_image_select_finalize      (GObject                *object);
-static void gl_wdgt_image_select_construct     (glWdgtImageSelect      *image_select,
-                                               glMerge                *merge,
-                                               glTextNode             *text_node);
-
-
-static void changed_cb                         (glWdgtImageSelect      *image_select);
-
-static void radio_toggled_cb                   (GtkToggleButton   *togglebutton,
-                                               glWdgtImageSelect  *image_select);
-
-\f
-/****************************************************************************/
-/* Boilerplate Object stuff.                                                */
-/****************************************************************************/
-GType
-gl_wdgt_image_select_get_type (void)
-{
-       static GType type = 0;
-
-       if (!type) {
-               static const GTypeInfo info = {
-                       sizeof (glWdgtImageSelectClass),
-                       NULL,
-                       NULL,
-                       (GClassInitFunc) gl_wdgt_image_select_class_init,
-                       NULL,
-                       NULL,
-                       sizeof (glWdgtImageSelect),
-                       0,
-                       (GInstanceInitFunc) gl_wdgt_image_select_instance_init,
-                       NULL
-               };
-
-               type = g_type_register_static (GL_TYPE_HIG_VBOX,
-                                              "glWdgtImageSelect", &info, 0);
-       }
-
-       return type;
-}
-
-static void
-gl_wdgt_image_select_class_init (glWdgtImageSelectClass *class)
-{
-       GObjectClass *object_class;
-
-       gl_debug (DEBUG_WDGT, "START");
-
-       object_class = (GObjectClass *) class;
-
-       parent_class = g_type_class_peek_parent (class);
-
-       object_class->finalize = gl_wdgt_image_select_finalize;
-
-       wdgt_image_select_signals[CHANGED] =
-           g_signal_new ("changed",
-                         G_OBJECT_CLASS_TYPE(object_class),
-                         G_SIGNAL_RUN_LAST,
-                         G_STRUCT_OFFSET (glWdgtImageSelectClass, changed),
-                         NULL, NULL,
-                         gl_marshal_VOID__VOID,
-                         G_TYPE_NONE, 0);
-
-       gl_debug (DEBUG_WDGT, "END");
-}
-
-static void
-gl_wdgt_image_select_instance_init (glWdgtImageSelect *image_select)
-{
-       gl_debug (DEBUG_WDGT, "START");
-
-       image_select->file_radio = NULL;
-       image_select->file_entry = NULL;
-
-       image_select->key_radio = NULL;
-       image_select->key_combo = NULL;
-       image_select->key_entry = NULL;
-
-       gl_debug (DEBUG_WDGT, "END");
-}
-
-static void
-gl_wdgt_image_select_finalize (GObject *object)
-{
-       glWdgtImageSelect *image_select;
-       glWdgtImageSelectClass *class;
-
-       gl_debug (DEBUG_WDGT, "START");
-
-       g_return_if_fail (object != NULL);
-       g_return_if_fail (GL_IS_WDGT_IMAGE_SELECT (object));
-
-       image_select = GL_WDGT_IMAGE_SELECT (object);
-
-       G_OBJECT_CLASS (parent_class)->finalize (object);
-
-       gl_debug (DEBUG_WDGT, "END");
-}
-
-/****************************************************************************/
-/* New widget.                                                              */
-/****************************************************************************/
-GtkWidget *
-gl_wdgt_image_select_new (glMerge *merge, glTextNode *text_node)
-{
-       glWdgtImageSelect *image_select;
-
-       gl_debug (DEBUG_WDGT, "START");
-
-       image_select = g_object_new (gl_wdgt_image_select_get_type (), NULL);
-
-       gl_wdgt_image_select_construct (image_select, merge, text_node);
-
-       gl_debug (DEBUG_WDGT, "END");
-
-       return GTK_WIDGET (image_select);
-}
-
-/*--------------------------------------------------------------------------*/
-/* PRIVATE.  Construct composite widget.                                    */
-/*--------------------------------------------------------------------------*/
-static void
-gl_wdgt_image_select_construct (glWdgtImageSelect *image_select,
-                               glMerge           *merge,
-                               glTextNode        *text_node)
-{
-       GtkWidget *wvbox, *whbox;
-       GSList    *radio_group = NULL;
-       GList     *keys;
-       gchar     *filename;
-
-       gl_debug (DEBUG_WDGT, "START");
-
-       wvbox = GTK_WIDGET (image_select);
-
-       /* ---- File line ---- */
-       whbox = gl_hig_hbox_new ();
-       gl_hig_vbox_add_widget (GL_HIG_VBOX(wvbox), whbox);
-
-       /* File radio */
-       image_select->file_radio = gtk_radio_button_new_with_label (radio_group,
-                                                                 _
-                                                                 ("File:"));
-       radio_group =
-           gtk_radio_button_get_group (GTK_RADIO_BUTTON (image_select->file_radio));
-       g_signal_connect (G_OBJECT (image_select->file_radio), "toggled",
-                         G_CALLBACK (radio_toggled_cb),
-                         G_OBJECT (image_select));
-       gl_hig_hbox_add_widget (GL_HIG_HBOX(whbox), image_select->file_radio);
-
-       /* File entry widget */
-       image_select->file_entry =
-               gnome_pixmap_entry_new ("image", "Load image", TRUE);
-       gnome_pixmap_entry_set_preview_size (GNOME_PIXMAP_ENTRY
-                                            (image_select->file_entry),
-                                            128, 128);
-
-       /* Set default path for image entry */
-       filename = text_node->field_flag? NULL : text_node->data;
-       if (filename != NULL) {
-               /* Set default path to the directory containing image. */
-               if (image_path != NULL)
-                       g_free (image_path);
-               image_path = g_path_get_dirname (filename);
-               if (image_path != NULL) {
-                       image_path = g_strconcat (image_path, "/", NULL);
-               }
-       } else if (image_path == NULL) {
-               /* First time, set it to our CWD. */
-               image_path = g_get_current_dir ();
-       }
-        /* Otherwise, leave it in the last directory that we got an image. */
-        gnome_pixmap_entry_set_pixmap_subdir (GNOME_PIXMAP_ENTRY(image_select->file_entry),
-                                             image_path);
-       g_signal_connect_swapped ( G_OBJECT(gnome_file_entry_gtk_entry
-                                           (GNOME_FILE_ENTRY (image_select->file_entry))),
-                                  "changed", G_CALLBACK (changed_cb), image_select);
-       gl_hig_hbox_add_widget (GL_HIG_HBOX(whbox), image_select->file_entry);
-
-
-       /* ---- Key line ---- */
-       whbox = gl_hig_hbox_new ();
-       gl_hig_vbox_add_widget (GL_HIG_VBOX(wvbox), whbox);
-
-       /* Key radio */
-       image_select->key_radio = gtk_radio_button_new_with_label (radio_group,
-                                                             _("Key:"));
-       g_signal_connect (G_OBJECT (image_select->key_radio), "toggled",
-                         G_CALLBACK (radio_toggled_cb),
-                         G_OBJECT (image_select));
-       gl_hig_hbox_add_widget (GL_HIG_HBOX(whbox), image_select->key_radio);
-
-       /* Key entry widget */
-       image_select->key_combo = gtk_combo_new ();
-       keys = gl_merge_get_key_list (merge);
-       if (keys != NULL)
-               gtk_combo_set_popdown_strings (GTK_COMBO (image_select->key_combo),
-                                              keys);
-       gl_merge_free_key_list (&keys);
-       image_select->key_entry = GTK_COMBO (image_select->key_combo)->entry;
-       gtk_entry_set_editable (GTK_ENTRY (image_select->key_entry), FALSE);
-       gtk_widget_set_size_request (image_select->key_combo, 200, -1);
-       g_signal_connect_swapped (G_OBJECT (image_select->key_entry), "changed",
-                                 G_CALLBACK (changed_cb),
-                                 G_OBJECT (image_select));
-       gl_hig_hbox_add_widget (GL_HIG_HBOX(whbox), image_select->key_combo);
-
-
-       gl_wdgt_image_select_set_data (image_select,
-                                      (merge != NULL),
-                                      text_node);
-
-       gl_debug (DEBUG_WDGT, "END");
-}
-
-/*--------------------------------------------------------------------------*/
-/* PRIVATE.  Callback for when any control in the widget has changed.       */
-/*--------------------------------------------------------------------------*/
-static void
-changed_cb (glWdgtImageSelect *image_select)
-{
-       gl_debug (DEBUG_WDGT, "START");
-
-       /* Emit our "changed" signal */
-       g_signal_emit (G_OBJECT (image_select), wdgt_image_select_signals[CHANGED], 0);
-
-       gl_debug (DEBUG_WDGT, "END");
-}
-
-/*--------------------------------------------------------------------------*/
-/* PRIVATE.  Callback to handle toggling of radio buttons                   */
-/*--------------------------------------------------------------------------*/
-static void
-radio_toggled_cb (GtkToggleButton   *togglebutton,
-                 glWdgtImageSelect *image_select)
-{
-       gl_debug (DEBUG_WDGT, "START");
-
-       if (gtk_toggle_button_get_active
-           (GTK_TOGGLE_BUTTON (image_select->file_radio))) {
-               gtk_widget_set_sensitive (image_select->file_entry, TRUE);
-               gtk_widget_set_sensitive (image_select->key_combo, FALSE);
-       } else {
-               gtk_widget_set_sensitive (image_select->file_entry, FALSE);
-               gtk_widget_set_sensitive (image_select->key_combo, TRUE);
-       }
-
-       /* Emit our "changed" signal */
-       g_signal_emit (G_OBJECT (image_select), wdgt_image_select_signals[CHANGED], 0);
-
-       gl_debug (DEBUG_WDGT, "END");
-}
-
-/****************************************************************************/
-/* Set new field definitions.                                               */
-/****************************************************************************/
-void
-gl_wdgt_image_select_set_field_defs  (glWdgtImageSelect *image_select,
-                                     glMerge            *merge)
-{
-       GList *keys;
-
-       gl_debug (DEBUG_WDGT, "START");
-
-       keys = gl_merge_get_key_list (merge);
-       if ( keys != NULL ) {
-               gtk_combo_set_popdown_strings (GTK_COMBO (image_select->key_combo),
-                                              keys);
-               gl_merge_free_key_list (&keys);
-       } else {
-               keys = g_list_append (keys, "");
-               gtk_combo_set_popdown_strings (GTK_COMBO (image_select->key_combo),
-                                              keys);
-               g_list_free (keys);
-       }
-
-       gl_debug (DEBUG_WDGT, "END");
-}
-
-
-/****************************************************************************/
-/* Get widget data.                                                         */
-/****************************************************************************/
-glTextNode *
-gl_wdgt_image_select_get_data (glWdgtImageSelect *image_select)
-{
-       glTextNode *text_node;
-
-       gl_debug (DEBUG_WDGT, "START");
-
-       text_node = g_new0(glTextNode,1);
-
-       if (gtk_toggle_button_get_active
-           (GTK_TOGGLE_BUTTON (image_select->file_radio))) {
-               text_node->field_flag = FALSE;
-               text_node->data =
-                       gnome_pixmap_entry_get_filename (GNOME_PIXMAP_ENTRY(image_select->file_entry));
-       } else {
-               text_node->field_flag = TRUE;
-               text_node->data = 
-                   gtk_editable_get_chars (GTK_EDITABLE (image_select->key_entry),
-                                           0, -1);
-               gl_debug (DEBUG_WDGT, "text_node: field_flag=%d, data=%s",
-                         text_node->field_flag, text_node->data);
-       }
-
-       gl_debug (DEBUG_WDGT, "END");
-
-       return text_node;
-}
-
-/****************************************************************************/
-/* Set widget data.                                                         */
-/****************************************************************************/
-void
-gl_wdgt_image_select_set_data (glWdgtImageSelect *image_select,
-                              gboolean           merge_flag,
-                              glTextNode        *text_node)
-{
-       gint pos;
-
-       gl_debug (DEBUG_WDGT, "START");
-
-       gtk_widget_set_sensitive (image_select->key_radio, merge_flag);
-
-       if (!text_node->field_flag) {
-
-               gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
-                                             (image_select->file_radio), TRUE);
-
-               gtk_widget_set_sensitive (image_select->file_entry, TRUE);
-               gtk_widget_set_sensitive (image_select->key_combo, FALSE);
-
-               if (text_node->data != NULL ) {
-                       gnome_file_entry_set_filename (GNOME_FILE_ENTRY(image_select->file_entry),
-                                                      text_node->data);
-               } else {
-                       gnome_file_entry_set_filename (GNOME_FILE_ENTRY(image_select->file_entry),
-                                                      "");
-               }
-       } else {
-
-               gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
-                                             (image_select->key_radio), TRUE);
-
-               gtk_widget_set_sensitive (image_select->file_entry, FALSE);
-               gtk_widget_set_sensitive (image_select->key_combo, TRUE);
-
-               g_signal_handlers_block_by_func (G_OBJECT
-                                               (image_select->key_entry),
-                                               G_CALLBACK (changed_cb),
-                                               image_select);
-               gtk_editable_delete_text (GTK_EDITABLE (image_select->key_entry), 0,
-                                         -1);
-               g_signal_handlers_unblock_by_func (G_OBJECT
-                                                 (image_select->key_entry),
-                                                 G_CALLBACK
-                                                 (changed_cb), image_select);
-
-               pos = 0;
-               gtk_editable_insert_text (GTK_EDITABLE (image_select->key_entry),
-                                         text_node->data,
-                                         strlen (text_node->data),
-                                         &pos);
-       }
-
-       gl_debug (DEBUG_WDGT, "END");
-}
-
-/****************************************************************************/
-/* Set size group for internal labels                                       */
-/****************************************************************************/
-void
-gl_wdgt_image_select_set_label_size_group (glWdgtImageSelect   *image_select,
-                                          GtkSizeGroup        *label_size_group)
-{
-       gl_debug (DEBUG_WDGT, "START");
-
-       gtk_size_group_add_widget (label_size_group, image_select->file_radio);
-       gtk_size_group_add_widget (label_size_group, image_select->key_radio);
-
-       gl_debug (DEBUG_WDGT, "END");
-}
diff --git a/glabels2/src/wdgt-image-select.h b/glabels2/src/wdgt-image-select.h
deleted file mode 100644 (file)
index 69e4eb4..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- *  (GLABELS) Label and Business Card Creation program for GNOME
- *
- *  wdgt_image_select.h:  image selection widget module header file
- *
- *  Copyright (C) 2001-2002  Jim Evins <evins@snaught.com>.
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
- */
-
-#ifndef __WDGT_IMAGE_SELECT_H__
-#define __WDGT_IMAGE_SELECT_H__
-
-#include <gnome.h>
-#include "text-node.h"
-#include "hig.h"
-
-G_BEGIN_DECLS
-
-#define GL_TYPE_WDGT_IMAGE_SELECT (gl_wdgt_image_select_get_type ())
-#define GL_WDGT_IMAGE_SELECT(obj) \
-        (GTK_CHECK_CAST((obj), GL_TYPE_WDGT_IMAGE_SELECT, glWdgtImageSelect ))
-#define GL_WDGT_IMAGE_SELECT_CLASS(klass) \
-        (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_WDGT_IMAGE_SELECT, glWdgtImageSelectClass))
-#define GL_IS_WDGT_IMAGE_SELECT(obj) \
-        (GTK_CHECK_TYPE ((obj), GL_TYPE_WDGT_IMAGE_SELECT))
-#define GL_IS_WDGT_IMAGE_SELECT_CLASS(klass) \
-        (GTK_CHECK_CLASS_TYPE ((klass), GL_TYPE_WDGT_IMAGE_SELECT))
-
-typedef struct _glWdgtImageSelect      glWdgtImageSelect;
-typedef struct _glWdgtImageSelectClass glWdgtImageSelectClass;
-
-struct _glWdgtImageSelect {
-       glHigVBox  parent_widget;
-
-       GtkWidget *file_radio;
-       GtkWidget *file_entry;
-
-       GtkWidget *key_radio;
-       GtkWidget *key_combo;
-       GtkWidget *key_entry;
-};
-
-struct _glWdgtImageSelectClass {
-       glHigVBoxClass parent_class;
-
-       void (*changed) (glWdgtImageSelect *image_select,
-                        gpointer           user_data);
-};
-
-GType       gl_wdgt_image_select_get_type             (void) G_GNUC_CONST;
-
-GtkWidget  *gl_wdgt_image_select_new                  (glMerge           *merge,
-                                                      glTextNode        *text_node);
-
-void        gl_wdgt_image_select_set_field_defs       (glWdgtImageSelect *image_select,
-                                                      glMerge           *merge);
-
-glTextNode *gl_wdgt_image_select_get_data             (glWdgtImageSelect *image_select);
-
-void        gl_wdgt_image_select_set_data             (glWdgtImageSelect *image_select,
-                                                      gboolean           merge_flag,
-                                                      glTextNode        *text_node);
-
-void        gl_wdgt_image_select_set_label_size_group (glWdgtImageSelect *image_select,
-                                                      GtkSizeGroup      *label_size_group);
-
-G_END_DECLS
-
-#endif