[Glade-users] segfault on gnome_app_set_contents - the return



--=-4Yzh9G7gu+v0Ztx8i8+X
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Ok, as an update I narrowed the case to a simple C source file included.
Feel free to compile and run it, and tell me where the matter lies ...

        Xav

------------------------------------
Hello,

I don't understand why I have a segfault.
My .glade file (attached) has 3 main windows:
- a GnomeApp without content
- a dummy window containing a widget hierarchy in a GtkVBox "vbox1"
- a dummy window containing a simple GtkLabel "dummylabel"

I instantiate the GnomeApp, and if I do:
        gnome_app_set_contents(GNOME_APP(appwindow),
glade_xml_get_widget(glade_xml_new("xav.glade", "dummylabel", NULL),
"dummylabel"));

everything works. But if I replace "dummylabel" with "vbox1", I get a
segfault (pasted at the end of the mail).

I don't understand why the GtkVBox causes a segfault. Is there something
special to do to the hierarchy ?

        Xav

The segfault:

0x4099faf9 in wait4 () from /lib/libc.so.6
#0  0x4099faf9 in wait4 () from /lib/libc.so.6
#1  0x40a12f60 in sys_sigabbrev () from /lib/libc.so.6
#2  0x40729061 in waitpid () from /lib/libpthread.so.0
#3  0x4008b9fa in libgnomeui_module_info_get () from /usr/lib/libgnomeui-2.so.0
#4  0x4072a75a in __pthread_sighandler () from /lib/libpthread.so.0
#5  0x4092c9c8 in sigaction () from /lib/libc.so.6
#6  0x406fb7dc in g_cclosure_marshal_VOID__VOID ()
   from /usr/lib/libgobject-2.0.so.0
#7  0x406ebbf6 in g_cclosure_new_swap () from /usr/lib/libgobject-2.0.so.0
#8  0x406eb956 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#9  0x406fad08 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
#10 0x406fa562 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#11 0x406fa75b in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#12 0x4035bd2a in gtk_widget_realize () from /usr/lib/libgtk-x11-2.0.so.0
#13 0x4035bb79 in gtk_widget_map () from /usr/lib/libgtk-x11-2.0.so.0
#14 0x402551cc in gtk_container_get_focus_hadjustment ()
   from /usr/lib/libgtk-x11-2.0.so.0
#15 0x402ec863 in gtk_table_get_homogeneous ()
   from /usr/lib/libgtk-x11-2.0.so.0
#16 0x402536f9 in gtk_container_forall () from /usr/lib/libgtk-x11-2.0.so.0
#17 0x402551ff in gtk_container_get_focus_hadjustment ()
   from /usr/lib/libgtk-x11-2.0.so.0
#18 0x406fb7dc in g_cclosure_marshal_VOID__VOID ()
   from /usr/lib/libgobject-2.0.so.0
#19 0x406ebbf6 in g_cclosure_new_swap () from /usr/lib/libgobject-2.0.so.0
#20 0x406eb956 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#21 0x406fad08 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
#22 0x406fa562 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#23 0x406fa75b in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#24 0x4035bb4b in gtk_widget_map () from /usr/lib/libgtk-x11-2.0.so.0
#25 0x402551cc in gtk_container_get_focus_hadjustment ()
   from /usr/lib/libgtk-x11-2.0.so.0
#26 0x4022e916 in gtk_box_set_child_packing ()
   from /usr/lib/libgtk-x11-2.0.so.0
#27 0x402536f9 in gtk_container_forall () from /usr/lib/libgtk-x11-2.0.so.0
#28 0x402551ff in gtk_container_get_focus_hadjustment ()
   from /usr/lib/libgtk-x11-2.0.so.0
#29 0x406fb7dc in g_cclosure_marshal_VOID__VOID ()
   from /usr/lib/libgobject-2.0.so.0
#30 0x406ebbf6 in g_cclosure_new_swap () from /usr/lib/libgobject-2.0.so.0
#31 0x406eb956 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#32 0x406fad08 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
#33 0x406fa562 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#34 0x406fa75b in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#35 0x4035bb4b in gtk_widget_map () from /usr/lib/libgtk-x11-2.0.so.0
#36 0x4035ecd9 in gtk_widget_set_parent () from /usr/lib/libgtk-x11-2.0.so.0
#37 0x40111250 in bonobo_dock_set_client_area ()
   from /usr/lib/libbonoboui-2.so.0
#38 0x4005e3a8 in gnome_app_set_contents () from /usr/lib/libgnomeui-2.so.0
#39 0x08051eb2 in seq_on_new_project (project=0x81023a0) at seqon.c:50
#40 0x0804c2ad in seq_project_new (name=0x805507a "New Project") at seq.c:34
#41 0x0804b732 in main (argc=1, argv=0xbffffb24) at main.c:19


--=-4Yzh9G7gu+v0Ztx8i8+X
Content-Disposition: attachment; filename=xav.glade
Content-Type: application/x-glade; name=xav.glade
Content-Transfer-Encoding: 8bit

<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd";>

<glade-interface>
<requires lib="gnome"/>
<requires lib="bonobo"/>

<widget class="GtkWindow" id="project_dummywin">
  <property name="visible">True</property>
  <property name="title" translatable="yes">window1</property>
  <property name="type">GTK_WINDOW_TOPLEVEL</property>
  <property name="window_position">GTK_WIN_POS_NONE</property>
  <property name="modal">False</property>
  <property name="resizable">True</property>
  <property name="destroy_with_parent">False</property>

  <child>
    <widget class="GtkVBox" id="vbox1">
      <property name="visible">True</property>
      <property name="homogeneous">False</property>
      <property name="spacing">0</property>

      <child>
        <widget class="GtkTable" id="main_table">
          <property name="visible">True</property>
          <property name="n_rows">3</property>
          <property name="n_columns">4</property>
          <property name="homogeneous">False</property>
          <property name="row_spacing">0</property>
          <property name="column_spacing">0</property>

          <child>
            <widget class="GtkViewport" id="tracks_viewport">
              <property name="visible">True</property>
              <property name="shadow_type">GTK_SHADOW_IN</property>

              <child>
                <widget class="GtkVBox" id="tracks_vbox">
                  <property name="visible">True</property>
                  <property name="homogeneous">False</property>
                  <property name="spacing">0</property>

                  <child>
                    <widget class="GtkDrawingArea" id="track_last">
                      <property name="width_request">100</property>
                      <property name="height_request">100</property>
                      <property name="visible">True</property>
                    </widget>
                    <packing>
                      <property name="padding">0</property>
                      <property name="expand">True</property>
                      <property name="fill">True</property>
                      <property name="pack_type">GTK_PACK_END</property>
                    </packing>
                  </child>
                </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>
            </packing>
          </child>

          <child>
            <widget class="GtkViewport" id="headers_viewport">
              <property name="visible">True</property>
              <property name="shadow_type">GTK_SHADOW_IN</property>

              <child>
                <widget class="GtkVBox" id="headers_vbox">
                  <property name="visible">True</property>
                  <property name="homogeneous">False</property>
                  <property name="spacing">0</property>

                  <child>
                    <widget class="GtkDrawingArea" id="header_last">
                      <property name="width_request">100</property>
                      <property name="visible">True</property>
                      <property name="sensitive">False</property>
                    </widget>
                    <packing>
                      <property name="padding">0</property>
                      <property name="expand">True</property>
                      <property name="fill">True</property>
                      <property name="pack_type">GTK_PACK_END</property>
                    </packing>
                  </child>
                </widget>
              </child>
            </widget>
            <packing>
              <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>
            </packing>
          </child>

          <child>
            <widget class="GtkViewport" id="time_viewport">
              <property name="visible">True</property>
              <property name="shadow_type">GTK_SHADOW_OUT</property>

              <child>
                <widget class="GtkVBox" id="time_vbox">
                  <property name="visible">True</property>
                  <property name="homogeneous">False</property>
                  <property name="spacing">0</property>

                  <child>
                    <widget class="GtkDrawingArea" id="timeline">
                      <property name="height_request">30</property>
                      <property name="visible">True</property>
                    </widget>
                    <packing>
                      <property name="padding">0</property>
                      <property name="expand">True</property>
                      <property name="fill">True</property>
                    </packing>
                  </child>
                </widget>
              </child>
            </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="y_options">fill</property>
            </packing>
          </child>

          <child>
            <widget class="GtkHScrollbar" id="time_scrollbar">
              <property name="visible">True</property>
              <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
              <property name="inverted">False</property>
              <property name="adjustment">0 0 0 0 0 0</property>
            </widget>
            <packing>
              <property name="left_attach">0</property>
              <property name="right_attach">3</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>

          <child>
            <widget class="GtkVScrollbar" id="tracks_scrollbar">
              <property name="visible">True</property>
              <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
              <property name="inverted">False</property>
              <property name="adjustment">0 0 0 0 0 0</property>
            </widget>
            <packing>
              <property name="left_attach">2</property>
              <property name="right_attach">3</property>
              <property name="top_attach">0</property>
              <property name="bottom_attach">2</property>
              <property name="x_options"></property>
              <property name="y_options">fill</property>
            </packing>
          </child>

          <child>
            <widget class="GtkVScale" id="time_scale">
              <property name="visible">True</property>
              <property name="can_focus">True</property>
              <property name="draw_value">False</property>
              <property name="value_pos">GTK_POS_TOP</property>
              <property name="digits">5</property>
              <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
              <property name="inverted">False</property>
              <property name="adjustment">0 -5 1 0 1 0</property>
            </widget>
            <packing>
              <property name="left_attach">3</property>
              <property name="right_attach">4</property>
              <property name="top_attach">0</property>
              <property name="bottom_attach">3</property>
              <property name="x_options"></property>
            </packing>
          </child>
        </widget>
        <packing>
          <property name="padding">0</property>
          <property name="expand">True</property>
          <property name="fill">True</property>
        </packing>
      </child>

      <child>
        <widget class="GtkHBox" id="timers_box">
          <property name="visible">True</property>
          <property name="homogeneous">True</property>
          <property name="spacing">0</property>

          <child>
            <widget class="GtkLabel" id="timer_mouse">
              <property name="visible">True</property>
              <property name="label" translatable="yes">mouse</property>
              <property name="use_underline">False</property>
              <property name="use_markup">False</property>
              <property name="justify">GTK_JUSTIFY_RIGHT</property>
              <property name="wrap">False</property>
              <property name="selectable">False</property>
              <property name="xalign">0.5</property>
              <property name="yalign">0.5</property>
              <property name="xpad">0</property>
              <property name="ypad">0</property>
            </widget>
            <packing>
              <property name="padding">0</property>
              <property name="expand">False</property>
              <property name="fill">False</property>
            </packing>
          </child>

          <child>
            <widget class="GtkLabel" id="timer_in">
              <property name="visible">True</property>
              <property name="label" translatable="yes"></property>
              <property name="use_underline">False</property>
              <property name="use_markup">False</property>
              <property name="justify">GTK_JUSTIFY_RIGHT</property>
              <property name="wrap">False</property>
              <property name="selectable">False</property>
              <property name="xalign">0.5</property>
              <property name="yalign">0.5</property>
              <property name="xpad">0</property>
              <property name="ypad">0</property>
            </widget>
            <packing>
              <property name="padding">0</property>
              <property name="expand">False</property>
              <property name="fill">False</property>
            </packing>
          </child>

          <child>
            <widget class="GtkLabel" id="timer_out">
              <property name="visible">True</property>
              <property name="label" translatable="yes"></property>
              <property name="use_underline">False</property>
              <property name="use_markup">False</property>
              <property name="justify">GTK_JUSTIFY_RIGHT</property>
              <property name="wrap">False</property>
              <property name="selectable">False</property>
              <property name="xalign">0.5</property>
              <property name="yalign">0.5</property>
              <property name="xpad">0</property>
              <property name="ypad">0</property>
            </widget>
            <packing>
              <property name="padding">0</property>
              <property name="expand">False</property>
              <property name="fill">False</property>
            </packing>
          </child>
        </widget>
        <packing>
          <property name="padding">0</property>
          <property name="expand">False</property>
          <property name="fill">False</property>
        </packing>
      </child>
    </widget>
  </child>
</widget>

<widget class="GnomeApp" id="appwindow">
  <property name="visible">True</property>
  <property name="title" translatable="yes">X Audio Vidéo</property>
  <property name="type">GTK_WINDOW_TOPLEVEL</property>
  <property name="window_position">GTK_WIN_POS_NONE</property>
  <property name="modal">False</property>
  <property name="resizable">True</property>
  <property name="destroy_with_parent">False</property>
  <property name="enable_layout_config">True</property>

  <child internal-child="dock">
    <widget class="BonoboDock" id="main_bonobodock">
      <property name="visible">True</property>
      <property name="allow_floating">True</property>

      <child>
        <widget class="BonoboDockItem" id="bonobodockitem1">
          <property name="visible">True</property>
          <property name="shadow_type">GTK_SHADOW_NONE</property>

          <child>
            <widget class="GtkMenuBar" id="menubar1">
              <property name="visible">True</property>

              <child>
                <widget class="GtkImageMenuItem" id="file1">
                  <property name="visible">True</property>
                  <property name="stock_item">GNOMEUIINFO_MENU_FILE_TREE</property>

                  <child>
                    <widget class="GtkMenu" id="file1_menu">

                      <child>
                        <widget class="GtkImageMenuItem" id="new1">
                          <property name="visible">True</property>
                          <property name="stock_item">GNOMEUIINFO_MENU_NEW_ITEM</property>
                          <property name="label" translatable="yes">_Nouveau</property>
                          <property name="use_underline">True</property>
                          <signal name="activate" handler="on_new1_activate" last_modification_time="Mon, 21 
Apr 2003 15:24:47 GMT"/>
                        </widget>
                      </child>

                      <child>
                        <widget class="GtkImageMenuItem" id="open1">
                          <property name="visible">True</property>
                          <property name="stock_item">GNOMEUIINFO_MENU_OPEN_ITEM</property>
                          <signal name="activate" handler="on_open1_activate" last_modification_time="Mon, 21 
Apr 2003 15:24:47 GMT"/>
                        </widget>
                      </child>

                      <child>
                        <widget class="GtkImageMenuItem" id="save1">
                          <property name="visible">True</property>
                          <property name="stock_item">GNOMEUIINFO_MENU_SAVE_ITEM</property>
                          <signal name="activate" handler="on_save1_activate" last_modification_time="Mon, 21 
Apr 2003 15:24:47 GMT"/>
                        </widget>
                      </child>

                      <child>
                        <widget class="GtkImageMenuItem" id="save_as1">
                          <property name="visible">True</property>
                          <property name="stock_item">GNOMEUIINFO_MENU_SAVE_AS_ITEM</property>
                          <signal name="activate" handler="on_save_as1_activate" last_modification_time="Mon, 
21 Apr 2003 15:24:47 GMT"/>
                        </widget>
                      </child>

                      <child>
                        <widget class="GtkSeparatorMenuItem" id="separator1">
                          <property name="visible">True</property>
                        </widget>
                      </child>

                      <child>
                        <widget class="GtkImageMenuItem" id="quit1">
                          <property name="visible">True</property>
                          <property name="stock_item">GNOMEUIINFO_MENU_EXIT_ITEM</property>
                          <signal name="activate" handler="on_quit1_activate" last_modification_time="Mon, 21 
Apr 2003 15:24:47 GMT"/>
                        </widget>
                      </child>
                    </widget>
                  </child>
                </widget>
              </child>

              <child>
                <widget class="GtkImageMenuItem" id="edit1">
                  <property name="visible">True</property>
                  <property name="stock_item">GNOMEUIINFO_MENU_EDIT_TREE</property>

                  <child>
                    <widget class="GtkMenu" id="edit1_menu">

                      <child>
                        <widget class="GtkImageMenuItem" id="cut1">
                          <property name="visible">True</property>
                          <property name="stock_item">GNOMEUIINFO_MENU_CUT_ITEM</property>
                          <signal name="activate" handler="on_cut1_activate" last_modification_time="Mon, 21 
Apr 2003 15:24:47 GMT"/>
                        </widget>
                      </child>

                      <child>
                        <widget class="GtkImageMenuItem" id="copy1">
                          <property name="visible">True</property>
                          <property name="stock_item">GNOMEUIINFO_MENU_COPY_ITEM</property>
                          <signal name="activate" handler="on_copy1_activate" last_modification_time="Mon, 21 
Apr 2003 15:24:47 GMT"/>
                        </widget>
                      </child>

                      <child>
                        <widget class="GtkImageMenuItem" id="paste1">
                          <property name="visible">True</property>
                          <property name="stock_item">GNOMEUIINFO_MENU_PASTE_ITEM</property>
                          <signal name="activate" handler="on_paste1_activate" last_modification_time="Mon, 
21 Apr 2003 15:24:47 GMT"/>
                        </widget>
                      </child>

                      <child>
                        <widget class="GtkImageMenuItem" id="clear1">
                          <property name="visible">True</property>
                          <property name="stock_item">GNOMEUIINFO_MENU_CLEAR_ITEM</property>
                          <signal name="activate" handler="on_clear1_activate" last_modification_time="Mon, 
21 Apr 2003 15:24:47 GMT"/>
                        </widget>
                      </child>

                      <child>
                        <widget class="GtkSeparatorMenuItem" id="separator2">
                          <property name="visible">True</property>
                        </widget>
                      </child>

                      <child>
                        <widget class="GtkImageMenuItem" id="properties1">
                          <property name="visible">True</property>
                          <property name="stock_item">GNOMEUIINFO_MENU_PROPERTIES_ITEM</property>
                          <signal name="activate" handler="on_properties1_activate" 
last_modification_time="Mon, 21 Apr 2003 15:24:47 GMT"/>
                        </widget>
                      </child>

                      <child>
                        <widget class="GtkSeparatorMenuItem" id="separator3">
                          <property name="visible">True</property>
                        </widget>
                      </child>

                      <child>
                        <widget class="GtkImageMenuItem" id="preferences1">
                          <property name="visible">True</property>
                          <property name="stock_item">GNOMEUIINFO_MENU_PREFERENCES_ITEM</property>
                          <signal name="activate" handler="on_preferences1_activate" 
last_modification_time="Mon, 21 Apr 2003 15:24:47 GMT"/>
                        </widget>
                      </child>
                    </widget>
                  </child>
                </widget>
              </child>

              <child>
                <widget class="GtkImageMenuItem" id="view1">
                  <property name="visible">True</property>
                  <property name="stock_item">GNOMEUIINFO_MENU_VIEW_TREE</property>

                  <child>
                    <widget class="GtkMenu" id="view1_menu">
                    </widget>
                  </child>
                </widget>
              </child>

              <child>
                <widget class="GtkImageMenuItem" id="help1">
                  <property name="visible">True</property>
                  <property name="stock_item">GNOMEUIINFO_MENU_HELP_TREE</property>

                  <child>
                    <widget class="GtkMenu" id="help1_menu">

                      <child>
                        <widget class="GtkImageMenuItem" id="about1">
                          <property name="visible">True</property>
                          <property name="stock_item">GNOMEUIINFO_MENU_ABOUT_ITEM</property>
                          <signal name="activate" handler="on_about1_activate" last_modification_time="Mon, 
21 Apr 2003 15:24:47 GMT"/>
                        </widget>
                      </child>
                    </widget>
                  </child>
                </widget>
              </child>
            </widget>
          </child>
        </widget>
        <packing>
          <property name="placement">BONOBO_DOCK_TOP</property>
          <property name="band">0</property>
          <property name="position">0</property>
          <property name="offset">0</property>
          <property 
name="behavior">BONOBO_DOCK_ITEM_BEH_EXCLUSIVE|BONOBO_DOCK_ITEM_BEH_NEVER_VERTICAL|BONOBO_DOCK_ITEM_BEH_LOCKED</property>
        </packing>
      </child>

      <child>
        <widget class="BonoboDockItem" id="bonobodockitem2">
          <property name="visible">True</property>
          <property name="shadow_type">GTK_SHADOW_OUT</property>

          <child>
            <widget class="GtkToolbar" id="toolbar1">
              <property name="border_width">1</property>
              <property name="visible">True</property>
              <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
              <property name="toolbar_style">GTK_TOOLBAR_BOTH_HORIZ</property>
              <property name="tooltips">True</property>

              <child>
                <widget class="button" id="button1">
                  <property name="visible">True</property>
                  <property name="tooltip" translatable="yes">Nouveau fichier</property>
                  <property name="label">gtk-new</property>
                  <property name="use_stock">True</property>
                </widget>
              </child>

              <child>
                <widget class="button" id="button2">
                  <property name="visible">True</property>
                  <property name="tooltip" translatable="yes">Ouvrir un fichier</property>
                  <property name="label">gtk-open</property>
                  <property name="use_stock">True</property>
                </widget>
              </child>

              <child>
                <widget class="button" id="button3">
                  <property name="visible">True</property>
                  <property name="tooltip" translatable="yes">Enregistrer le fichier</property>
                  <property name="label">gtk-save</property>
                  <property name="use_stock">True</property>
                </widget>
              </child>

              <child>
                <widget class="button" id="button4">
                  <property name="visible">True</property>
                  <property name="tooltip" translatable="yes">Enregistrer le fichier</property>
                  <property name="label">gtk-add</property>
                  <property name="use_stock">True</property>
                </widget>
              </child>

              <child>
                <widget class="button" id="button5">
                  <property name="visible">True</property>
                  <property name="tooltip" translatable="yes">Enregistrer le fichier</property>
                  <property name="label">gtk-home</property>
                  <property name="use_stock">True</property>
                </widget>
              </child>
            </widget>
          </child>
        </widget>
        <packing>
          <property name="placement">BONOBO_DOCK_TOP</property>
          <property name="band">1</property>
          <property name="position">0</property>
          <property name="offset">0</property>
          <property name="behavior">BONOBO_DOCK_ITEM_BEH_EXCLUSIVE</property>
        </packing>
      </child>

      <child>
        <placeholder/>
      </child>
    </widget>
    <packing>
      <property name="padding">0</property>
      <property name="expand">True</property>
      <property name="fill">True</property>
    </packing>
  </child>

  <child internal-child="appbar">
    <widget class="GnomeAppBar" id="appbar1">
      <property name="visible">True</property>
      <property name="has_progress">True</property>
      <property name="has_status">True</property>
    </widget>
    <packing>
      <property name="padding">0</property>
      <property name="expand">True</property>
      <property name="fill">True</property>
    </packing>
  </child>
</widget>

<widget class="GtkWindow" id="win2">
  <property name="visible">True</property>
  <property name="title" translatable="yes">win2</property>
  <property name="type">GTK_WINDOW_TOPLEVEL</property>
  <property name="window_position">GTK_WIN_POS_NONE</property>
  <property name="modal">False</property>
  <property name="resizable">True</property>
  <property name="destroy_with_parent">False</property>

  <child>
    <widget class="GtkLabel" id="dummylabel">
      <property name="visible">True</property>
      <property name="label" translatable="yes">dummylabel</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.5</property>
      <property name="yalign">0.5</property>
      <property name="xpad">0</property>
      <property name="ypad">0</property>
    </widget>
  </child>
</widget>

</glade-interface>

--=-4Yzh9G7gu+v0Ztx8i8+X
Content-Disposition: attachment; filename=main.c
Content-Type: text/x-c; name=main.c; charset=ISO-8859-15
Content-Transfer-Encoding: 7bit

#include <libgnomeui/libgnomeui.h>
#include <glade/glade.h>

void some_signal_handler_func(GtkWidget *widget, gpointer user_data) {
  /* do something useful here */
}

int main(int argc, char *argv[]) {
        GladeXML *xml;
        GtkWidget *appwindow;

        gnome_program_init("xav", "0.0", LIBGNOMEUI_MODULE, argc, argv, NULL);

        /* load the interface */
        appwindow = glade_xml_get_widget(glade_xml_new("xav.glade", "appwindow", NULL), "appwindow");
        gnome_app_set_contents(GNOME_APP(appwindow), glade_xml_get_widget(glade_xml_new("xav.glade", "vbox1", 
NULL), "vbox1"));

        /* connect the signals in the interface */
        glade_xml_signal_autoconnect(xml);

        /* start the event loop */
        gtk_main();

        return 0;
}

--=-4Yzh9G7gu+v0Ztx8i8+X
Content-Disposition: attachment; filename=Makefile
Content-Type: text/x-makefile; name=Makefile; charset=ISO-8859-15
Content-Transfer-Encoding: 7bit

PACKAGES=glib-2.0 gtk+-2.0 libglade-2.0 pango libxml-2.0 libgnomeui-2.0
CC=gcc
CFLAGS=`pkg-config $(PACKAGES) --cflags` -Wall -ggdb -I.
LDFLAGS=`pkg-config $(PACKAGES) --libs`

CFILES = main.c
OFILES = $(patsubst %.c, %.o, $(CFILES))

xav: $(OFILES)
        libtool --mode=link $(CC) $(LDFLAGS) -o xav $(OFILES)

clean:
        rm -f $(OFILES) xav

depend:
        makedepend $(CFLAGS) $(CFILES)


# DO NOT DELETE


--=-4Yzh9G7gu+v0Ztx8i8+X--





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]