Put demo window in another process to prevent some bugs of gtk+.
authorHong Jen Yee (PCMan) <pcman.tw@gmail.com>
Thu, 27 Mar 2008 15:17:58 +0000 (15:17 +0000)
committerHong Jen Yee (PCMan) <pcman.tw@gmail.com>
Thu, 27 Mar 2008 15:17:58 +0000 (15:17 +0000)
demo.glade [new file with mode: 0644]
lxappearance.glade
src/demo-ui.c [new file with mode: 0644]
src/demo-ui.h [new file with mode: 0644]
src/demo-ui.patch [new file with mode: 0644]
src/demo.c [new file with mode: 0644]
src/demo.h [new file with mode: 0644]
src/main-dlg-ui.c
src/main-dlg.c
src/main.c

diff --git a/demo.glade b/demo.glade
new file mode 100644 (file)
index 0000000..2a28879
--- /dev/null
@@ -0,0 +1,721 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkWindow" id="demo_window">
+  <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+  <property name="title" translatable="yes"></property>
+  <property name="type">GTK_WINDOW_POPUP</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="decorated">False</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+
+  <child>
+    <widget class="GtkVBox" id="top_vbox">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+      <signal name="destroy" handler="gtk_main_quit" last_modification_time="Mon, 24 Mar 2008 23:13:27 GMT"/>
+
+      <child>
+       <widget class="GtkMenuBar" id="menubar1">
+         <property name="visible">True</property>
+         <property name="pack_direction">GTK_PACK_DIRECTION_LTR</property>
+         <property name="child_pack_direction">GTK_PACK_DIRECTION_LTR</property>
+
+         <child>
+           <widget class="GtkMenuItem" id="menuitem1">
+             <property name="visible">True</property>
+             <property name="label" translatable="yes">_File</property>
+             <property name="use_underline">True</property>
+
+             <child>
+               <widget class="GtkMenu" id="menuitem1_menu">
+
+                 <child>
+                   <widget class="GtkImageMenuItem" id="new1">
+                     <property name="visible">True</property>
+                     <property name="label">gtk-new</property>
+                     <property name="use_stock">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkImageMenuItem" id="open1">
+                     <property name="visible">True</property>
+                     <property name="label">gtk-open</property>
+                     <property name="use_stock">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkImageMenuItem" id="save1">
+                     <property name="visible">True</property>
+                     <property name="label">gtk-save</property>
+                     <property name="use_stock">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkImageMenuItem" id="save_as1">
+                     <property name="visible">True</property>
+                     <property name="label">gtk-save-as</property>
+                     <property name="use_stock">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkSeparatorMenuItem" id="separatormenuitem1">
+                     <property name="visible">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkImageMenuItem" id="quit1">
+                     <property name="visible">True</property>
+                     <property name="label">gtk-quit</property>
+                     <property name="use_stock">True</property>
+                   </widget>
+                 </child>
+               </widget>
+             </child>
+           </widget>
+         </child>
+
+         <child>
+           <widget class="GtkMenuItem" id="menuitem2">
+             <property name="visible">True</property>
+             <property name="label" translatable="yes">_Edit</property>
+             <property name="use_underline">True</property>
+
+             <child>
+               <widget class="GtkMenu" id="menuitem2_menu">
+
+                 <child>
+                   <widget class="GtkImageMenuItem" id="cut1">
+                     <property name="visible">True</property>
+                     <property name="label">gtk-cut</property>
+                     <property name="use_stock">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkImageMenuItem" id="copy1">
+                     <property name="visible">True</property>
+                     <property name="label">gtk-copy</property>
+                     <property name="use_stock">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkImageMenuItem" id="paste1">
+                     <property name="visible">True</property>
+                     <property name="label">gtk-paste</property>
+                     <property name="use_stock">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkImageMenuItem" id="delete1">
+                     <property name="visible">True</property>
+                     <property name="label">gtk-delete</property>
+                     <property name="use_stock">True</property>
+                   </widget>
+                 </child>
+               </widget>
+             </child>
+           </widget>
+         </child>
+
+         <child>
+           <widget class="GtkMenuItem" id="menuitem4">
+             <property name="visible">True</property>
+             <property name="label" translatable="yes">_Help</property>
+             <property name="use_underline">True</property>
+
+             <child>
+               <widget class="GtkMenu" id="menuitem4_menu">
+
+                 <child>
+                   <widget class="GtkImageMenuItem" id="about1">
+                     <property name="visible">True</property>
+                     <property name="label">gtk-about</property>
+                     <property name="use_stock">True</property>
+                   </widget>
+                 </child>
+               </widget>
+             </child>
+           </widget>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">False</property>
+         <property name="fill">False</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkHandleBox" id="handlebox1">
+         <property name="visible">True</property>
+         <property name="shadow_type">GTK_SHADOW_OUT</property>
+         <property name="handle_position">GTK_POS_LEFT</property>
+         <property name="snap_edge">GTK_POS_TOP</property>
+
+         <child>
+           <widget class="GtkToolbar" id="toolbar1">
+             <property name="visible">True</property>
+             <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
+             <property name="toolbar_style">GTK_TOOLBAR_BOTH</property>
+             <property name="tooltips">True</property>
+             <property name="show_arrow">False</property>
+
+             <child>
+               <widget class="GtkToolButton" id="toolbutton1">
+                 <property name="visible">True</property>
+                 <property name="tooltip" translatable="yes">Back</property>
+                 <property name="stock_id">gtk-go-back</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkToolButton" id="toolbutton2">
+                 <property name="visible">True</property>
+                 <property name="tooltip" translatable="yes">Forward</property>
+                 <property name="stock_id">gtk-go-forward</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkToolButton" id="toolbutton3">
+                 <property name="visible">True</property>
+                 <property name="tooltip" translatable="yes">Stop</property>
+                 <property name="stock_id">gtk-stop</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
+             </child>
+           </widget>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">False</property>
+         <property name="fill">False</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkNotebook" id="notebook2">
+         <property name="visible">True</property>
+         <property name="can_focus">True</property>
+         <property name="show_tabs">True</property>
+         <property name="show_border">True</property>
+         <property name="tab_pos">GTK_POS_TOP</property>
+         <property name="scrollable">False</property>
+         <property name="enable_popup">False</property>
+
+         <child>
+           <widget class="GtkScrolledWindow" id="scrolledwindow4">
+             <property name="visible">True</property>
+             <property name="can_focus">True</property>
+             <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+             <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+             <property name="shadow_type">GTK_SHADOW_IN</property>
+             <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+             <child>
+               <widget class="GtkIconView" id="icon_view">
+                 <property name="visible">True</property>
+                 <property name="can_focus">True</property>
+                 <property name="selection_mode">GTK_SELECTION_SINGLE</property>
+                 <property name="orientation">GTK_ORIENTATION_VERTICAL</property>
+                 <property name="reorderable">False</property>
+               </widget>
+             </child>
+           </widget>
+           <packing>
+             <property name="tab_expand">False</property>
+             <property name="tab_fill">True</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkLabel" id="label12">
+             <property name="visible">True</property>
+             <property name="label" translatable="yes">Tab1</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>
+             <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>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkHBox" id="hbox2">
+             <property name="visible">True</property>
+             <property name="homogeneous">False</property>
+             <property name="spacing">0</property>
+
+             <child>
+               <widget class="GtkFrame" id="frame2">
+                 <property name="border_width">4</property>
+                 <property name="visible">True</property>
+                 <property name="label_xalign">0</property>
+                 <property name="label_yalign">0.5</property>
+                 <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+                 <child>
+                   <widget class="GtkAlignment" id="alignment2">
+                     <property name="visible">True</property>
+                     <property name="xalign">0.5</property>
+                     <property name="yalign">0.5</property>
+                     <property name="xscale">1</property>
+                     <property name="yscale">1</property>
+                     <property name="top_padding">0</property>
+                     <property name="bottom_padding">4</property>
+                     <property name="left_padding">4</property>
+                     <property name="right_padding">0</property>
+
+                     <child>
+                       <widget class="GtkVBox" id="vbox6">
+                         <property name="visible">True</property>
+                         <property name="homogeneous">False</property>
+                         <property name="spacing">4</property>
+
+                         <child>
+                           <widget class="GtkRadioButton" id="radiobutton1">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="label" translatable="yes">Radio Button</property>
+                             <property name="use_underline">True</property>
+                             <property name="relief">GTK_RELIEF_NORMAL</property>
+                             <property name="focus_on_click">True</property>
+                             <property name="active">False</property>
+                             <property name="inconsistent">False</property>
+                             <property name="draw_indicator">True</property>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">False</property>
+                             <property name="fill">False</property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkRadioButton" id="radiobutton2">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="label" translatable="yes">Radio Button</property>
+                             <property name="use_underline">True</property>
+                             <property name="relief">GTK_RELIEF_NORMAL</property>
+                             <property name="focus_on_click">True</property>
+                             <property name="active">False</property>
+                             <property name="inconsistent">False</property>
+                             <property name="draw_indicator">True</property>
+                             <property name="group">radiobutton1</property>
+                           </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">False</property>
+                             <property name="fill">True</property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkCheckButton" id="checkbutton1">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="label" translatable="yes">Check Button</property>
+                             <property name="use_underline">True</property>
+                             <property name="relief">GTK_RELIEF_NORMAL</property>
+                             <property name="focus_on_click">True</property>
+                             <property name="active">False</property>
+                             <property name="inconsistent">False</property>
+                             <property name="draw_indicator">True</property>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">False</property>
+                             <property name="fill">False</property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkEntry" id="entry1">
+                             <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">●</property>
+                             <property name="activates_default">False</property>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">False</property>
+                             <property name="fill">False</property>
+                           </packing>
+                         </child>
+                       </widget>
+                     </child>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkLabel" id="label16">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">Demo</property>
+                     <property name="use_underline">False</property>
+                     <property name="use_markup">True</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>
+                     <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                     <property name="width_chars">-1</property>
+                     <property name="single_line_mode">False</property>
+                     <property name="angle">0</property>
+                   </widget>
+                   <packing>
+                     <property name="type">label_item</property>
+                   </packing>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">True</property>
+                 <property name="fill">True</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkVBox" id="vbox7">
+                 <property name="border_width">4</property>
+                 <property name="visible">True</property>
+                 <property name="homogeneous">False</property>
+                 <property name="spacing">0</property>
+
+                 <child>
+                   <widget class="GtkProgressBar" id="progressbar1">
+                     <property name="visible">True</property>
+                     <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
+                     <property name="fraction">0.600000023842</property>
+                     <property name="pulse_step">0.10000000149</property>
+                     <property name="text">60 %</property>
+                     <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkHScale" id="hscale1">
+                     <property name="visible">True</property>
+                     <property name="can_focus">True</property>
+                     <property name="draw_value">True</property>
+                     <property name="value_pos">GTK_POS_TOP</property>
+                     <property name="digits">1</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="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">True</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkHBox" id="hbox3">
+                     <property name="visible">True</property>
+                     <property name="homogeneous">False</property>
+                     <property name="spacing">0</property>
+
+                     <child>
+                       <widget class="GtkSpinButton" id="spinbutton1">
+                         <property name="visible">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="climb_rate">1</property>
+                         <property name="digits">0</property>
+                         <property name="numeric">False</property>
+                         <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+                         <property name="snap_to_ticks">False</property>
+                         <property name="wrap">False</property>
+                         <property name="adjustment">1 0 100 1 10 10</property>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">True</property>
+                         <property name="fill">True</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkButton" id="button1">
+                         <property name="visible">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="label" translatable="yes">button1</property>
+                         <property name="use_underline">True</property>
+                         <property name="relief">GTK_RELIEF_NORMAL</property>
+                         <property name="focus_on_click">True</property>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">False</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">True</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkComboBox" id="combobox2">
+                     <property name="visible">True</property>
+                     <property name="items" translatable="yes">Test Item 1
+Test Item 2
+Test Item 3</property>
+                     <property name="add_tearoffs">False</property>
+                     <property name="focus_on_click">True</property>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">True</property>
+                   </packing>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">True</property>
+                 <property name="fill">True</property>
+               </packing>
+             </child>
+           </widget>
+           <packing>
+             <property name="tab_expand">False</property>
+             <property name="tab_fill">True</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkLabel" id="label13">
+             <property name="visible">True</property>
+             <property name="label" translatable="yes">Tab2</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>
+             <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>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkScrolledWindow" id="scrolledwindow5">
+             <property name="visible">True</property>
+             <property name="can_focus">True</property>
+             <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+             <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+             <property name="shadow_type">GTK_SHADOW_IN</property>
+             <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+             <child>
+               <widget class="GtkTextView" id="text_view">
+                 <property name="visible">True</property>
+                 <property name="can_focus">True</property>
+                 <property name="editable">True</property>
+                 <property name="overwrite">False</property>
+                 <property name="accepts_tab">True</property>
+                 <property name="justification">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap_mode">GTK_WRAP_NONE</property>
+                 <property name="cursor_visible">True</property>
+                 <property name="pixels_above_lines">0</property>
+                 <property name="pixels_below_lines">0</property>
+                 <property name="pixels_inside_wrap">0</property>
+                 <property name="left_margin">0</property>
+                 <property name="right_margin">0</property>
+                 <property name="indent">0</property>
+                 <property name="text" translatable="yes">Type some characters here to test currently selected font.</property>
+               </widget>
+             </child>
+           </widget>
+           <packing>
+             <property name="tab_expand">False</property>
+             <property name="tab_fill">True</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkLabel" id="label14">
+             <property name="visible">True</property>
+             <property name="label" translatable="yes">Tab3</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>
+             <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>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkScrolledWindow" id="scrolledwindow6">
+             <property name="visible">True</property>
+             <property name="can_focus">True</property>
+             <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+             <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+             <property name="shadow_type">GTK_SHADOW_IN</property>
+             <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+             <child>
+               <widget class="GtkTreeView" id="demo_treeview">
+                 <property name="visible">True</property>
+                 <property name="can_focus">True</property>
+                 <property name="headers_visible">True</property>
+                 <property name="rules_hint">True</property>
+                 <property name="reorderable">False</property>
+                 <property name="enable_search">True</property>
+                 <property name="fixed_height_mode">False</property>
+                 <property name="hover_selection">False</property>
+                 <property name="hover_expand">False</property>
+               </widget>
+             </child>
+           </widget>
+           <packing>
+             <property name="tab_expand">False</property>
+             <property name="tab_fill">True</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkLabel" id="label17">
+             <property name="visible">True</property>
+             <property name="label" translatable="yes">Tab4</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>
+             <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>
+           </packing>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">True</property>
+         <property name="fill">True</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkStatusbar" id="statusbar1">
+         <property name="visible">True</property>
+         <property name="has_resize_grip">True</property>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">False</property>
+         <property name="fill">False</property>
+       </packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
index 9b94e60..f36f6b5 100644 (file)
                      <property name="right_padding">4</property>
 
                      <child>
                      <property name="right_padding">4</property>
 
                      <child>
-                       <widget class="GtkVBox" id="top_vbox">
-                         <property name="visible">True</property>
-                         <property name="homogeneous">False</property>
-                         <property name="spacing">0</property>
-                         <signal name="destroy" handler="gtk_main_quit"/>
-
-                         <child>
-                           <widget class="GtkMenuBar" id="menubar1">
-                             <property name="visible">True</property>
-                             <property name="pack_direction">GTK_PACK_DIRECTION_LTR</property>
-                             <property name="child_pack_direction">GTK_PACK_DIRECTION_LTR</property>
-
-                             <child>
-                               <widget class="GtkMenuItem" id="menuitem1">
-                                 <property name="visible">True</property>
-                                 <property name="label" translatable="yes">_File</property>
-                                 <property name="use_underline">True</property>
-
-                                 <child>
-                                   <widget class="GtkMenu" id="menuitem1_menu">
-
-                                     <child>
-                                       <widget class="GtkImageMenuItem" id="new1">
-                                         <property name="visible">True</property>
-                                         <property name="label">gtk-new</property>
-                                         <property name="use_stock">True</property>
-                                       </widget>
-                                     </child>
-
-                                     <child>
-                                       <widget class="GtkImageMenuItem" id="open1">
-                                         <property name="visible">True</property>
-                                         <property name="label">gtk-open</property>
-                                         <property name="use_stock">True</property>
-                                       </widget>
-                                     </child>
-
-                                     <child>
-                                       <widget class="GtkImageMenuItem" id="save1">
-                                         <property name="visible">True</property>
-                                         <property name="label">gtk-save</property>
-                                         <property name="use_stock">True</property>
-                                       </widget>
-                                     </child>
-
-                                     <child>
-                                       <widget class="GtkImageMenuItem" id="save_as1">
-                                         <property name="visible">True</property>
-                                         <property name="label">gtk-save-as</property>
-                                         <property name="use_stock">True</property>
-                                       </widget>
-                                     </child>
-
-                                     <child>
-                                       <widget class="GtkSeparatorMenuItem" id="separatormenuitem1">
-                                         <property name="visible">True</property>
-                                       </widget>
-                                     </child>
-
-                                     <child>
-                                       <widget class="GtkImageMenuItem" id="quit1">
-                                         <property name="visible">True</property>
-                                         <property name="label">gtk-quit</property>
-                                         <property name="use_stock">True</property>
-                                       </widget>
-                                     </child>
-                                   </widget>
-                                 </child>
-                               </widget>
-                             </child>
-
-                             <child>
-                               <widget class="GtkMenuItem" id="menuitem2">
-                                 <property name="visible">True</property>
-                                 <property name="label" translatable="yes">_Edit</property>
-                                 <property name="use_underline">True</property>
-
-                                 <child>
-                                   <widget class="GtkMenu" id="menuitem2_menu">
-
-                                     <child>
-                                       <widget class="GtkImageMenuItem" id="cut1">
-                                         <property name="visible">True</property>
-                                         <property name="label">gtk-cut</property>
-                                         <property name="use_stock">True</property>
-                                       </widget>
-                                     </child>
-
-                                     <child>
-                                       <widget class="GtkImageMenuItem" id="copy1">
-                                         <property name="visible">True</property>
-                                         <property name="label">gtk-copy</property>
-                                         <property name="use_stock">True</property>
-                                       </widget>
-                                     </child>
-
-                                     <child>
-                                       <widget class="GtkImageMenuItem" id="paste1">
-                                         <property name="visible">True</property>
-                                         <property name="label">gtk-paste</property>
-                                         <property name="use_stock">True</property>
-                                       </widget>
-                                     </child>
-
-                                     <child>
-                                       <widget class="GtkImageMenuItem" id="delete1">
-                                         <property name="visible">True</property>
-                                         <property name="label">gtk-delete</property>
-                                         <property name="use_stock">True</property>
-                                       </widget>
-                                     </child>
-                                   </widget>
-                                 </child>
-                               </widget>
-                             </child>
-
-                             <child>
-                               <widget class="GtkMenuItem" id="menuitem4">
-                                 <property name="visible">True</property>
-                                 <property name="label" translatable="yes">_Help</property>
-                                 <property name="use_underline">True</property>
-
-                                 <child>
-                                   <widget class="GtkMenu" id="menuitem4_menu">
-
-                                     <child>
-                                       <widget class="GtkImageMenuItem" id="about1">
-                                         <property name="visible">True</property>
-                                         <property name="label">gtk-about</property>
-                                         <property name="use_stock">True</property>
-                                       </widget>
-                                     </child>
-                                   </widget>
-                                 </child>
-                               </widget>
-                             </child>
-                           </widget>
-                           <packing>
-                             <property name="padding">0</property>
-                             <property name="expand">False</property>
-                             <property name="fill">False</property>
-                           </packing>
-                         </child>
-
-                         <child>
-                           <widget class="GtkHandleBox" id="handlebox1">
-                             <property name="visible">True</property>
-                             <property name="shadow_type">GTK_SHADOW_OUT</property>
-                             <property name="handle_position">GTK_POS_LEFT</property>
-                             <property name="snap_edge">GTK_POS_TOP</property>
-
-                             <child>
-                               <widget class="GtkToolbar" id="toolbar1">
-                                 <property name="visible">True</property>
-                                 <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
-                                 <property name="toolbar_style">GTK_TOOLBAR_BOTH</property>
-                                 <property name="tooltips">True</property>
-                                 <property name="show_arrow">False</property>
-
-                                 <child>
-                                   <widget class="GtkToolButton" id="toolbutton1">
-                                     <property name="visible">True</property>
-                                     <property name="tooltip" translatable="yes">Back</property>
-                                     <property name="stock_id">gtk-go-back</property>
-                                     <property name="visible_horizontal">True</property>
-                                     <property name="visible_vertical">True</property>
-                                     <property name="is_important">False</property>
-                                   </widget>
-                                   <packing>
-                                     <property name="expand">False</property>
-                                     <property name="homogeneous">True</property>
-                                   </packing>
-                                 </child>
-
-                                 <child>
-                                   <widget class="GtkToolButton" id="toolbutton2">
-                                     <property name="visible">True</property>
-                                     <property name="tooltip" translatable="yes">Forward</property>
-                                     <property name="stock_id">gtk-go-forward</property>
-                                     <property name="visible_horizontal">True</property>
-                                     <property name="visible_vertical">True</property>
-                                     <property name="is_important">False</property>
-                                   </widget>
-                                   <packing>
-                                     <property name="expand">False</property>
-                                     <property name="homogeneous">True</property>
-                                   </packing>
-                                 </child>
-
-                                 <child>
-                                   <widget class="GtkToolButton" id="toolbutton3">
-                                     <property name="visible">True</property>
-                                     <property name="tooltip" translatable="yes">Stop</property>
-                                     <property name="stock_id">gtk-stop</property>
-                                     <property name="visible_horizontal">True</property>
-                                     <property name="visible_vertical">True</property>
-                                     <property name="is_important">False</property>
-                                   </widget>
-                                   <packing>
-                                     <property name="expand">False</property>
-                                     <property name="homogeneous">True</property>
-                                   </packing>
-                                 </child>
-                               </widget>
-                             </child>
-                           </widget>
-                           <packing>
-                             <property name="padding">0</property>
-                             <property name="expand">False</property>
-                             <property name="fill">False</property>
-                           </packing>
-                         </child>
-
-                         <child>
-                           <widget class="GtkNotebook" id="notebook2">
-                             <property name="visible">True</property>
-                             <property name="can_focus">True</property>
-                             <property name="show_tabs">True</property>
-                             <property name="show_border">True</property>
-                             <property name="tab_pos">GTK_POS_TOP</property>
-                             <property name="scrollable">False</property>
-                             <property name="enable_popup">False</property>
-
-                             <child>
-                               <widget class="GtkScrolledWindow" id="scrolledwindow4">
-                                 <property name="visible">True</property>
-                                 <property name="can_focus">True</property>
-                                 <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                                 <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                                 <property name="shadow_type">GTK_SHADOW_IN</property>
-                                 <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-                                 <child>
-                                   <widget class="GtkIconView" id="icon_view">
-                                     <property name="visible">True</property>
-                                     <property name="can_focus">True</property>
-                                     <property name="selection_mode">GTK_SELECTION_SINGLE</property>
-                                     <property name="orientation">GTK_ORIENTATION_VERTICAL</property>
-                                     <property name="reorderable">False</property>
-                                   </widget>
-                                 </child>
-                               </widget>
-                               <packing>
-                                 <property name="tab_expand">False</property>
-                                 <property name="tab_fill">True</property>
-                               </packing>
-                             </child>
-
-                             <child>
-                               <widget class="GtkLabel" id="label12">
-                                 <property name="visible">True</property>
-                                 <property name="label" translatable="yes">Tab1</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>
-                                 <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>
-                               </packing>
-                             </child>
-
-                             <child>
-                               <widget class="GtkHBox" id="hbox2">
-                                 <property name="visible">True</property>
-                                 <property name="homogeneous">False</property>
-                                 <property name="spacing">0</property>
-
-                                 <child>
-                                   <widget class="GtkFrame" id="frame2">
-                                     <property name="border_width">4</property>
-                                     <property name="visible">True</property>
-                                     <property name="label_xalign">0</property>
-                                     <property name="label_yalign">0.5</property>
-                                     <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-                                     <child>
-                                       <widget class="GtkAlignment" id="alignment2">
-                                         <property name="visible">True</property>
-                                         <property name="xalign">0.5</property>
-                                         <property name="yalign">0.5</property>
-                                         <property name="xscale">1</property>
-                                         <property name="yscale">1</property>
-                                         <property name="top_padding">0</property>
-                                         <property name="bottom_padding">4</property>
-                                         <property name="left_padding">4</property>
-                                         <property name="right_padding">0</property>
-
-                                         <child>
-                                           <widget class="GtkVBox" id="vbox6">
-                                             <property name="visible">True</property>
-                                             <property name="homogeneous">False</property>
-                                             <property name="spacing">4</property>
-
-                                             <child>
-                                               <widget class="GtkRadioButton" id="radiobutton1">
-                                                 <property name="visible">True</property>
-                                                 <property name="can_focus">True</property>
-                                                 <property name="label" translatable="yes">Radio Button</property>
-                                                 <property name="use_underline">True</property>
-                                                 <property name="relief">GTK_RELIEF_NORMAL</property>
-                                                 <property name="focus_on_click">True</property>
-                                                 <property name="active">False</property>
-                                                 <property name="inconsistent">False</property>
-                                                 <property name="draw_indicator">True</property>
-                                               </widget>
-                                               <packing>
-                                                 <property name="padding">0</property>
-                                                 <property name="expand">False</property>
-                                                 <property name="fill">False</property>
-                                               </packing>
-                                             </child>
-
-                                             <child>
-                                               <widget class="GtkRadioButton" id="radiobutton2">
-                                                 <property name="visible">True</property>
-                                                 <property name="can_focus">True</property>
-                                                 <property name="label" translatable="yes">Radio Button</property>
-                                                 <property name="use_underline">True</property>
-                                                 <property name="relief">GTK_RELIEF_NORMAL</property>
-                                                 <property name="focus_on_click">True</property>
-                                                 <property name="active">False</property>
-                                                 <property name="inconsistent">False</property>
-                                                 <property name="draw_indicator">True</property>
-                                               </widget>
-                                               <packing>
-                                                 <property name="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">False</property>
-                                                 <property name="fill">True</property>
-                                               </packing>
-                                             </child>
-
-                                             <child>
-                                               <widget class="GtkCheckButton" id="checkbutton1">
-                                                 <property name="visible">True</property>
-                                                 <property name="can_focus">True</property>
-                                                 <property name="label" translatable="yes">Check Button</property>
-                                                 <property name="use_underline">True</property>
-                                                 <property name="relief">GTK_RELIEF_NORMAL</property>
-                                                 <property name="focus_on_click">True</property>
-                                                 <property name="active">False</property>
-                                                 <property name="inconsistent">False</property>
-                                                 <property name="draw_indicator">True</property>
-                                               </widget>
-                                               <packing>
-                                                 <property name="padding">0</property>
-                                                 <property name="expand">False</property>
-                                                 <property name="fill">False</property>
-                                               </packing>
-                                             </child>
-
-                                             <child>
-                                               <widget class="GtkEntry" id="entry1">
-                                                 <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">●</property>
-                                                 <property name="activates_default">False</property>
-                                               </widget>
-                                               <packing>
-                                                 <property name="padding">0</property>
-                                                 <property name="expand">False</property>
-                                                 <property name="fill">False</property>
-                                               </packing>
-                                             </child>
-                                           </widget>
-                                         </child>
-                                       </widget>
-                                     </child>
-
-                                     <child>
-                                       <widget class="GtkLabel" id="label16">
-                                         <property name="visible">True</property>
-                                         <property name="label" translatable="yes">Demo</property>
-                                         <property name="use_underline">False</property>
-                                         <property name="use_markup">True</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>
-                                         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-                                         <property name="width_chars">-1</property>
-                                         <property name="single_line_mode">False</property>
-                                         <property name="angle">0</property>
-                                       </widget>
-                                       <packing>
-                                         <property name="type">label_item</property>
-                                       </packing>
-                                     </child>
-                                   </widget>
-                                   <packing>
-                                     <property name="padding">0</property>
-                                     <property name="expand">True</property>
-                                     <property name="fill">True</property>
-                                   </packing>
-                                 </child>
-
-                                 <child>
-                                   <widget class="GtkVBox" id="vbox7">
-                                     <property name="border_width">4</property>
-                                     <property name="visible">True</property>
-                                     <property name="homogeneous">False</property>
-                                     <property name="spacing">0</property>
-
-                                     <child>
-                                       <widget class="GtkProgressBar" id="progressbar1">
-                                         <property name="visible">True</property>
-                                         <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
-                                         <property name="fraction">0.600000023842</property>
-                                         <property name="pulse_step">0.10000000149</property>
-                                         <property name="text">60 %</property>
-                                         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-                                       </widget>
-                                       <packing>
-                                         <property name="padding">0</property>
-                                         <property name="expand">False</property>
-                                         <property name="fill">False</property>
-                                       </packing>
-                                     </child>
-
-                                     <child>
-                                       <widget class="GtkHScale" id="hscale1">
-                                         <property name="visible">True</property>
-                                         <property name="can_focus">True</property>
-                                         <property name="draw_value">True</property>
-                                         <property name="value_pos">GTK_POS_TOP</property>
-                                         <property name="digits">1</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="padding">0</property>
-                                         <property name="expand">False</property>
-                                         <property name="fill">True</property>
-                                       </packing>
-                                     </child>
-
-                                     <child>
-                                       <widget class="GtkHBox" id="hbox3">
-                                         <property name="visible">True</property>
-                                         <property name="homogeneous">False</property>
-                                         <property name="spacing">0</property>
-
-                                         <child>
-                                           <widget class="GtkSpinButton" id="spinbutton1">
-                                             <property name="visible">True</property>
-                                             <property name="can_focus">True</property>
-                                             <property name="climb_rate">1</property>
-                                             <property name="digits">0</property>
-                                             <property name="numeric">False</property>
-                                             <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-                                             <property name="snap_to_ticks">False</property>
-                                             <property name="wrap">False</property>
-                                             <property name="adjustment">1 0 100 1 10 10</property>
-                                           </widget>
-                                           <packing>
-                                             <property name="padding">0</property>
-                                             <property name="expand">True</property>
-                                             <property name="fill">True</property>
-                                           </packing>
-                                         </child>
-
-                                         <child>
-                                           <widget class="GtkButton" id="button1">
-                                             <property name="visible">True</property>
-                                             <property name="can_focus">True</property>
-                                             <property name="label" translatable="yes">button1</property>
-                                             <property name="use_underline">True</property>
-                                             <property name="relief">GTK_RELIEF_NORMAL</property>
-                                             <property name="focus_on_click">True</property>
-                                           </widget>
-                                           <packing>
-                                             <property name="padding">0</property>
-                                             <property name="expand">False</property>
-                                             <property name="fill">False</property>
-                                           </packing>
-                                         </child>
-                                       </widget>
-                                       <packing>
-                                         <property name="padding">0</property>
-                                         <property name="expand">False</property>
-                                         <property name="fill">True</property>
-                                       </packing>
-                                     </child>
-
-                                     <child>
-                                       <widget class="GtkComboBox" id="combobox2">
-                                         <property name="visible">True</property>
-                                         <property name="items" translatable="yes">Test Item 1
-Test Item 2
-Test Item 3</property>
-                                         <property name="add_tearoffs">False</property>
-                                         <property name="focus_on_click">True</property>
-                                       </widget>
-                                       <packing>
-                                         <property name="padding">0</property>
-                                         <property name="expand">False</property>
-                                         <property name="fill">True</property>
-                                       </packing>
-                                     </child>
-                                   </widget>
-                                   <packing>
-                                     <property name="padding">0</property>
-                                     <property name="expand">True</property>
-                                     <property name="fill">True</property>
-                                   </packing>
-                                 </child>
-                               </widget>
-                               <packing>
-                                 <property name="tab_expand">False</property>
-                                 <property name="tab_fill">True</property>
-                               </packing>
-                             </child>
-
-                             <child>
-                               <widget class="GtkLabel" id="label13">
-                                 <property name="visible">True</property>
-                                 <property name="label" translatable="yes">Tab2</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>
-                                 <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>
-                               </packing>
-                             </child>
-
-                             <child>
-                               <widget class="GtkScrolledWindow" id="scrolledwindow5">
-                                 <property name="visible">True</property>
-                                 <property name="can_focus">True</property>
-                                 <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                                 <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                                 <property name="shadow_type">GTK_SHADOW_IN</property>
-                                 <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-                                 <child>
-                                   <widget class="GtkTextView" id="text_view">
-                                     <property name="visible">True</property>
-                                     <property name="can_focus">True</property>
-                                     <property name="editable">True</property>
-                                     <property name="overwrite">False</property>
-                                     <property name="accepts_tab">True</property>
-                                     <property name="justification">GTK_JUSTIFY_LEFT</property>
-                                     <property name="wrap_mode">GTK_WRAP_NONE</property>
-                                     <property name="cursor_visible">True</property>
-                                     <property name="pixels_above_lines">0</property>
-                                     <property name="pixels_below_lines">0</property>
-                                     <property name="pixels_inside_wrap">0</property>
-                                     <property name="left_margin">0</property>
-                                     <property name="right_margin">0</property>
-                                     <property name="indent">0</property>
-                                     <property name="text" translatable="yes">Type some characters here to test currently selected font.</property>
-                                   </widget>
-                                 </child>
-                               </widget>
-                               <packing>
-                                 <property name="tab_expand">False</property>
-                                 <property name="tab_fill">True</property>
-                               </packing>
-                             </child>
-
-                             <child>
-                               <widget class="GtkLabel" id="label14">
-                                 <property name="visible">True</property>
-                                 <property name="label" translatable="yes">Tab3</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>
-                                 <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>
-                               </packing>
-                             </child>
-                           </widget>
-                           <packing>
-                             <property name="padding">0</property>
-                             <property name="expand">True</property>
-                             <property name="fill">True</property>
-                           </packing>
-                         </child>
-
-                         <child>
-                           <widget class="GtkStatusbar" id="statusbar1">
-                             <property name="visible">True</property>
-                             <property name="has_resize_grip">True</property>
-                           </widget>
-                           <packing>
-                             <property name="padding">0</property>
-                             <property name="expand">False</property>
-                             <property name="fill">False</property>
-                           </packing>
-                         </child>
-                       </widget>
+                       <placeholder/>
                      </child>
                    </widget>
                  </child>
                      </child>
                    </widget>
                  </child>
diff --git a/src/demo-ui.c b/src/demo-ui.c
new file mode 100644 (file)
index 0000000..2823d5b
--- /dev/null
@@ -0,0 +1,413 @@
+/*
+ * DO NOT EDIT THIS FILE - it is generated by Glade.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdio.h>
+
+#include <gdk/gdkkeysyms.h>
+#include <gtk/gtk.h>
+
+#include "demo.h"
+#include "demo-ui.h"
+#include "glade-support.h"
+
+#define GLADE_HOOKUP_OBJECT(component,widget,name) \
+  g_object_set_data_full (G_OBJECT (component), name, \
+    gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref)
+
+#define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \
+  g_object_set_data (G_OBJECT (component), name, widget)
+
+GtkWidget*
+create_demo_window (void)
+{
+  GtkWidget *demo_window;
+  GtkWidget *top_vbox;
+  GtkWidget *menubar1;
+  GtkWidget *menuitem1;
+  GtkWidget *menuitem1_menu;
+  GtkWidget *new1;
+  GtkWidget *open1;
+  GtkWidget *save1;
+  GtkWidget *save_as1;
+  GtkWidget *separatormenuitem1;
+  GtkWidget *quit1;
+  GtkWidget *menuitem2;
+  GtkWidget *menuitem2_menu;
+  GtkWidget *cut1;
+  GtkWidget *copy1;
+  GtkWidget *paste1;
+  GtkWidget *delete1;
+  GtkWidget *menuitem4;
+  GtkWidget *menuitem4_menu;
+  GtkWidget *about1;
+  GtkWidget *handlebox1;
+  GtkWidget *toolbar1;
+  GtkIconSize tmp_toolbar_icon_size;
+  GtkWidget *toolbutton1;
+  GtkWidget *toolbutton2;
+  GtkWidget *toolbutton3;
+  GtkWidget *notebook2;
+  GtkWidget *scrolledwindow4;
+  GtkWidget *icon_view;
+  GtkWidget *label12;
+  GtkWidget *hbox2;
+  GtkWidget *frame2;
+  GtkWidget *alignment2;
+  GtkWidget *vbox6;
+  GtkWidget *radiobutton1;
+  GSList *radiobutton1_group = NULL;
+  GtkWidget *radiobutton2;
+  GtkWidget *hseparator1;
+  GtkWidget *checkbutton1;
+  GtkWidget *entry1;
+  GtkWidget *label16;
+  GtkWidget *vbox7;
+  GtkWidget *progressbar1;
+  GtkWidget *hscale1;
+  GtkWidget *hbox3;
+  GtkObject *spinbutton1_adj;
+  GtkWidget *spinbutton1;
+  GtkWidget *button1;
+  GtkWidget *combobox2;
+  GtkWidget *label13;
+  GtkWidget *scrolledwindow5;
+  GtkWidget *text_view;
+  GtkWidget *label14;
+  GtkWidget *scrolledwindow6;
+  GtkWidget *demo_treeview;
+  GtkWidget *label17;
+  GtkWidget *statusbar1;
+  GtkAccelGroup *accel_group;
+  GtkTooltips *tooltips;
+
+  tooltips = gtk_tooltips_new ();
+
+  accel_group = gtk_accel_group_new ();
+/*
+  demo_window = gtk_window_new (GTK_WINDOW_POPUP);
+  gtk_widget_set_events (demo_window, GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
+  gtk_window_set_decorated (GTK_WINDOW (demo_window), FALSE);
+*/
+  top_vbox = gtk_vbox_new (FALSE, 0);
+  gtk_widget_show (top_vbox);
+  demo_window = top_vbox;
+
+/*
+  gtk_container_add (GTK_CONTAINER (demo_window), top_vbox);
+*/
+
+  menubar1 = gtk_menu_bar_new ();
+  gtk_widget_show (menubar1);
+  gtk_box_pack_start (GTK_BOX (top_vbox), menubar1, FALSE, FALSE, 0);
+
+  menuitem1 = gtk_menu_item_new_with_mnemonic (_("_File"));
+  gtk_widget_show (menuitem1);
+  gtk_container_add (GTK_CONTAINER (menubar1), menuitem1);
+
+  menuitem1_menu = gtk_menu_new ();
+  gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem1), menuitem1_menu);
+
+  new1 = gtk_image_menu_item_new_from_stock ("gtk-new", accel_group);
+  gtk_widget_show (new1);
+  gtk_container_add (GTK_CONTAINER (menuitem1_menu), new1);
+
+  open1 = gtk_image_menu_item_new_from_stock ("gtk-open", accel_group);
+  gtk_widget_show (open1);
+  gtk_container_add (GTK_CONTAINER (menuitem1_menu), open1);
+
+  save1 = gtk_image_menu_item_new_from_stock ("gtk-save", accel_group);
+  gtk_widget_show (save1);
+  gtk_container_add (GTK_CONTAINER (menuitem1_menu), save1);
+
+  save_as1 = gtk_image_menu_item_new_from_stock ("gtk-save-as", accel_group);
+  gtk_widget_show (save_as1);
+  gtk_container_add (GTK_CONTAINER (menuitem1_menu), save_as1);
+
+  separatormenuitem1 = gtk_separator_menu_item_new ();
+  gtk_widget_show (separatormenuitem1);
+  gtk_container_add (GTK_CONTAINER (menuitem1_menu), separatormenuitem1);
+  gtk_widget_set_sensitive (separatormenuitem1, FALSE);
+
+  quit1 = gtk_image_menu_item_new_from_stock ("gtk-quit", accel_group);
+  gtk_widget_show (quit1);
+  gtk_container_add (GTK_CONTAINER (menuitem1_menu), quit1);
+
+  menuitem2 = gtk_menu_item_new_with_mnemonic (_("_Edit"));
+  gtk_widget_show (menuitem2);
+  gtk_container_add (GTK_CONTAINER (menubar1), menuitem2);
+
+  menuitem2_menu = gtk_menu_new ();
+  gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem2), menuitem2_menu);
+
+  cut1 = gtk_image_menu_item_new_from_stock ("gtk-cut", accel_group);
+  gtk_widget_show (cut1);
+  gtk_container_add (GTK_CONTAINER (menuitem2_menu), cut1);
+
+  copy1 = gtk_image_menu_item_new_from_stock ("gtk-copy", accel_group);
+  gtk_widget_show (copy1);
+  gtk_container_add (GTK_CONTAINER (menuitem2_menu), copy1);
+
+  paste1 = gtk_image_menu_item_new_from_stock ("gtk-paste", accel_group);
+  gtk_widget_show (paste1);
+  gtk_container_add (GTK_CONTAINER (menuitem2_menu), paste1);
+
+  delete1 = gtk_image_menu_item_new_from_stock ("gtk-delete", accel_group);
+  gtk_widget_show (delete1);
+  gtk_container_add (GTK_CONTAINER (menuitem2_menu), delete1);
+
+  menuitem4 = gtk_menu_item_new_with_mnemonic (_("_Help"));
+  gtk_widget_show (menuitem4);
+  gtk_container_add (GTK_CONTAINER (menubar1), menuitem4);
+
+  menuitem4_menu = gtk_menu_new ();
+  gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem4), menuitem4_menu);
+
+  about1 = gtk_image_menu_item_new_from_stock ("gtk-about", accel_group);
+  gtk_widget_show (about1);
+  gtk_container_add (GTK_CONTAINER (menuitem4_menu), about1);
+
+  handlebox1 = gtk_handle_box_new ();
+  gtk_widget_show (handlebox1);
+  gtk_box_pack_start (GTK_BOX (top_vbox), handlebox1, FALSE, FALSE, 0);
+
+  toolbar1 = gtk_toolbar_new ();
+  gtk_widget_show (toolbar1);
+  gtk_container_add (GTK_CONTAINER (handlebox1), toolbar1);
+  gtk_toolbar_set_style (GTK_TOOLBAR (toolbar1), GTK_TOOLBAR_BOTH);
+  gtk_toolbar_set_show_arrow (GTK_TOOLBAR (toolbar1), FALSE);
+  tmp_toolbar_icon_size = gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar1));
+
+  toolbutton1 = (GtkWidget*) gtk_tool_button_new_from_stock ("gtk-go-back");
+  gtk_widget_show (toolbutton1);
+  gtk_container_add (GTK_CONTAINER (toolbar1), toolbutton1);
+  gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (toolbutton1), tooltips, _("Back"), NULL);
+
+  toolbutton2 = (GtkWidget*) gtk_tool_button_new_from_stock ("gtk-go-forward");
+  gtk_widget_show (toolbutton2);
+  gtk_container_add (GTK_CONTAINER (toolbar1), toolbutton2);
+  gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (toolbutton2), tooltips, _("Forward"), NULL);
+
+  toolbutton3 = (GtkWidget*) gtk_tool_button_new_from_stock ("gtk-stop");
+  gtk_widget_show (toolbutton3);
+  gtk_container_add (GTK_CONTAINER (toolbar1), toolbutton3);
+  gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (toolbutton3), tooltips, _("Stop"), NULL);
+
+  notebook2 = gtk_notebook_new ();
+  gtk_widget_show (notebook2);
+  gtk_box_pack_start (GTK_BOX (top_vbox), notebook2, TRUE, TRUE, 0);
+
+  scrolledwindow4 = gtk_scrolled_window_new (NULL, NULL);
+  gtk_widget_show (scrolledwindow4);
+  gtk_container_add (GTK_CONTAINER (notebook2), scrolledwindow4);
+  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow4), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow4), GTK_SHADOW_IN);
+
+  icon_view = gtk_icon_view_new ();
+  gtk_widget_show (icon_view);
+  gtk_container_add (GTK_CONTAINER (scrolledwindow4), icon_view);
+
+  label12 = gtk_label_new (_("Tab1"));
+  gtk_widget_show (label12);
+  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 0), label12);
+
+  hbox2 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_show (hbox2);
+  gtk_container_add (GTK_CONTAINER (notebook2), hbox2);
+
+  frame2 = gtk_frame_new (NULL);
+  gtk_widget_show (frame2);
+  gtk_box_pack_start (GTK_BOX (hbox2), frame2, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame2), 4);
+
+  alignment2 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment2);
+  gtk_container_add (GTK_CONTAINER (frame2), alignment2);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment2), 0, 4, 4, 0);
+
+  vbox6 = gtk_vbox_new (FALSE, 4);
+  gtk_widget_show (vbox6);
+  gtk_container_add (GTK_CONTAINER (alignment2), vbox6);
+
+  radiobutton1 = gtk_radio_button_new_with_mnemonic (NULL, _("Radio Button"));
+  gtk_widget_show (radiobutton1);
+  gtk_box_pack_start (GTK_BOX (vbox6), radiobutton1, FALSE, FALSE, 0);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton1), radiobutton1_group);
+  radiobutton1_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton1));
+
+  radiobutton2 = gtk_radio_button_new_with_mnemonic (NULL, _("Radio Button"));
+  gtk_widget_show (radiobutton2);
+  gtk_box_pack_start (GTK_BOX (vbox6), radiobutton2, FALSE, FALSE, 0);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton2), radiobutton1_group);
+  radiobutton1_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton2));
+
+  hseparator1 = gtk_hseparator_new ();
+  gtk_widget_show (hseparator1);
+  gtk_box_pack_start (GTK_BOX (vbox6), hseparator1, FALSE, TRUE, 0);
+
+  checkbutton1 = gtk_check_button_new_with_mnemonic (_("Check Button"));
+  gtk_widget_show (checkbutton1);
+  gtk_box_pack_start (GTK_BOX (vbox6), checkbutton1, FALSE, FALSE, 0);
+
+  entry1 = gtk_entry_new ();
+  gtk_widget_show (entry1);
+  gtk_box_pack_start (GTK_BOX (vbox6), entry1, FALSE, FALSE, 0);
+  gtk_entry_set_invisible_char (GTK_ENTRY (entry1), 9679);
+
+  label16 = gtk_label_new (_("Demo"));
+  gtk_widget_show (label16);
+  gtk_frame_set_label_widget (GTK_FRAME (frame2), label16);
+  gtk_label_set_use_markup (GTK_LABEL (label16), TRUE);
+
+  vbox7 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_show (vbox7);
+  gtk_box_pack_start (GTK_BOX (hbox2), vbox7, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (vbox7), 4);
+
+  progressbar1 = gtk_progress_bar_new ();
+  gtk_widget_show (progressbar1);
+  gtk_box_pack_start (GTK_BOX (vbox7), progressbar1, FALSE, FALSE, 0);
+  gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (progressbar1), 0.6);
+  gtk_progress_bar_set_text (GTK_PROGRESS_BAR (progressbar1), "60 %");
+
+  hscale1 = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (0, 0, 0, 0, 0, 0)));
+  gtk_widget_show (hscale1);
+  gtk_box_pack_start (GTK_BOX (vbox7), hscale1, FALSE, TRUE, 0);
+
+  hbox3 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_show (hbox3);
+  gtk_box_pack_start (GTK_BOX (vbox7), hbox3, FALSE, TRUE, 0);
+
+  spinbutton1_adj = gtk_adjustment_new (1, 0, 100, 1, 10, 10);
+  spinbutton1 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton1_adj), 1, 0);
+  gtk_widget_show (spinbutton1);
+  gtk_box_pack_start (GTK_BOX (hbox3), spinbutton1, TRUE, TRUE, 0);
+
+  button1 = gtk_button_new_with_mnemonic (_("button1"));
+  gtk_widget_show (button1);
+  gtk_box_pack_start (GTK_BOX (hbox3), button1, FALSE, FALSE, 0);
+
+  combobox2 = gtk_combo_box_new_text ();
+  gtk_widget_show (combobox2);
+  gtk_box_pack_start (GTK_BOX (vbox7), combobox2, FALSE, TRUE, 0);
+  gtk_combo_box_append_text (GTK_COMBO_BOX (combobox2), _("Test Item 1"));
+  gtk_combo_box_append_text (GTK_COMBO_BOX (combobox2), _("Test Item 2"));
+  gtk_combo_box_append_text (GTK_COMBO_BOX (combobox2), _("Test Item 3"));
+
+  label13 = gtk_label_new (_("Tab2"));
+  gtk_widget_show (label13);
+  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 1), label13);
+
+  scrolledwindow5 = gtk_scrolled_window_new (NULL, NULL);
+  gtk_widget_show (scrolledwindow5);
+  gtk_container_add (GTK_CONTAINER (notebook2), scrolledwindow5);
+  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow5), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow5), GTK_SHADOW_IN);
+
+  text_view = gtk_text_view_new ();
+  gtk_widget_show (text_view);
+  gtk_container_add (GTK_CONTAINER (scrolledwindow5), text_view);
+  gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (text_view)), _("Type some characters here to test currently selected font."), -1);
+
+  label14 = gtk_label_new (_("Tab3"));
+  gtk_widget_show (label14);
+  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 2), label14);
+
+  scrolledwindow6 = gtk_scrolled_window_new (NULL, NULL);
+  gtk_widget_show (scrolledwindow6);
+  gtk_container_add (GTK_CONTAINER (notebook2), scrolledwindow6);
+  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow6), GTK_SHADOW_IN);
+
+  demo_treeview = gtk_tree_view_new ();
+  gtk_widget_show (demo_treeview);
+  gtk_container_add (GTK_CONTAINER (scrolledwindow6), demo_treeview);
+  gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (demo_treeview), TRUE);
+
+  label17 = gtk_label_new (_("Tab4"));
+  gtk_widget_show (label17);
+  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 3), label17);
+
+  statusbar1 = gtk_statusbar_new ();
+  gtk_widget_show (statusbar1);
+  gtk_box_pack_start (GTK_BOX (top_vbox), statusbar1, FALSE, FALSE, 0);
+
+  g_signal_connect ((gpointer) top_vbox, "destroy",
+                    G_CALLBACK (gtk_main_quit),
+                    NULL);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+
+/*
+  GLADE_HOOKUP_OBJECT_NO_REF (demo_window, demo_window, "demo_window");
+  GLADE_HOOKUP_OBJECT (demo_window, top_vbox, "top_vbox");
+  GLADE_HOOKUP_OBJECT (demo_window, menubar1, "menubar1");
+  GLADE_HOOKUP_OBJECT (demo_window, menuitem1, "menuitem1");
+  GLADE_HOOKUP_OBJECT (demo_window, menuitem1_menu, "menuitem1_menu");
+  GLADE_HOOKUP_OBJECT (demo_window, new1, "new1");
+  GLADE_HOOKUP_OBJECT (demo_window, open1, "open1");
+  GLADE_HOOKUP_OBJECT (demo_window, save1, "save1");
+  GLADE_HOOKUP_OBJECT (demo_window, save_as1, "save_as1");
+  GLADE_HOOKUP_OBJECT (demo_window, separatormenuitem1, "separatormenuitem1");
+  GLADE_HOOKUP_OBJECT (demo_window, quit1, "quit1");
+  GLADE_HOOKUP_OBJECT (demo_window, menuitem2, "menuitem2");
+  GLADE_HOOKUP_OBJECT (demo_window, menuitem2_menu, "menuitem2_menu");
+  GLADE_HOOKUP_OBJECT (demo_window, cut1, "cut1");
+  GLADE_HOOKUP_OBJECT (demo_window, copy1, "copy1");
+  GLADE_HOOKUP_OBJECT (demo_window, paste1, "paste1");
+  GLADE_HOOKUP_OBJECT (demo_window, delete1, "delete1");
+  GLADE_HOOKUP_OBJECT (demo_window, menuitem4, "menuitem4");
+  GLADE_HOOKUP_OBJECT (demo_window, menuitem4_menu, "menuitem4_menu");
+  GLADE_HOOKUP_OBJECT (demo_window, about1, "about1");
+  GLADE_HOOKUP_OBJECT (demo_window, handlebox1, "handlebox1");
+  GLADE_HOOKUP_OBJECT (demo_window, toolbar1, "toolbar1");
+  GLADE_HOOKUP_OBJECT (demo_window, toolbutton1, "toolbutton1");
+  GLADE_HOOKUP_OBJECT (demo_window, toolbutton2, "toolbutton2");
+  GLADE_HOOKUP_OBJECT (demo_window, toolbutton3, "toolbutton3");
+  GLADE_HOOKUP_OBJECT (demo_window, notebook2, "notebook2");
+  GLADE_HOOKUP_OBJECT (demo_window, scrolledwindow4, "scrolledwindow4");
+*/
+  GLADE_HOOKUP_OBJECT (demo_window, icon_view, "icon_view");
+/*
+  GLADE_HOOKUP_OBJECT (demo_window, label12, "label12");
+  GLADE_HOOKUP_OBJECT (demo_window, hbox2, "hbox2");
+  GLADE_HOOKUP_OBJECT (demo_window, frame2, "frame2");
+  GLADE_HOOKUP_OBJECT (demo_window, alignment2, "alignment2");
+  GLADE_HOOKUP_OBJECT (demo_window, vbox6, "vbox6");
+  GLADE_HOOKUP_OBJECT (demo_window, radiobutton1, "radiobutton1");
+  GLADE_HOOKUP_OBJECT (demo_window, radiobutton2, "radiobutton2");
+  GLADE_HOOKUP_OBJECT (demo_window, hseparator1, "hseparator1");
+  GLADE_HOOKUP_OBJECT (demo_window, checkbutton1, "checkbutton1");
+  GLADE_HOOKUP_OBJECT (demo_window, entry1, "entry1");
+  GLADE_HOOKUP_OBJECT (demo_window, label16, "label16");
+  GLADE_HOOKUP_OBJECT (demo_window, vbox7, "vbox7");
+  GLADE_HOOKUP_OBJECT (demo_window, progressbar1, "progressbar1");
+  GLADE_HOOKUP_OBJECT (demo_window, hscale1, "hscale1");
+  GLADE_HOOKUP_OBJECT (demo_window, hbox3, "hbox3");
+  GLADE_HOOKUP_OBJECT (demo_window, spinbutton1, "spinbutton1");
+  GLADE_HOOKUP_OBJECT (demo_window, button1, "button1");
+  GLADE_HOOKUP_OBJECT (demo_window, combobox2, "combobox2");
+  GLADE_HOOKUP_OBJECT (demo_window, label13, "label13");
+  GLADE_HOOKUP_OBJECT (demo_window, scrolledwindow5, "scrolledwindow5");
+  GLADE_HOOKUP_OBJECT (demo_window, text_view, "text_view");
+  GLADE_HOOKUP_OBJECT (demo_window, label14, "label14");
+  GLADE_HOOKUP_OBJECT (demo_window, scrolledwindow6, "scrolledwindow6");
+*/
+  GLADE_HOOKUP_OBJECT (demo_window, demo_treeview, "demo_treeview");
+/*
+  GLADE_HOOKUP_OBJECT (demo_window, label17, "label17");
+  GLADE_HOOKUP_OBJECT (demo_window, statusbar1, "statusbar1");
+  GLADE_HOOKUP_OBJECT_NO_REF (demo_window, tooltips, "tooltips");
+
+  gtk_window_add_accel_group (GTK_WINDOW (demo_window), accel_group);
+*/
+  return demo_window;
+}
+
diff --git a/src/demo-ui.h b/src/demo-ui.h
new file mode 100644 (file)
index 0000000..432f896
--- /dev/null
@@ -0,0 +1,5 @@
+/*
+ * DO NOT EDIT THIS FILE - it is generated by Glade.
+ */
+
+GtkWidget* create_demo_window (void);
diff --git a/src/demo-ui.patch b/src/demo-ui.patch
new file mode 100644 (file)
index 0000000..cd47a14
--- /dev/null
@@ -0,0 +1,59 @@
+--- demo-ui.c.orig     2008-03-27 23:13:31.000000000 +0800
++++ demo-ui.c  2008-03-27 23:14:23.000000000 +0800
+@@ -92,14 +92,18 @@
+   tooltips = gtk_tooltips_new ();
+   accel_group = gtk_accel_group_new ();
+-
++/*
+   demo_window = gtk_window_new (GTK_WINDOW_POPUP);
+   gtk_widget_set_events (demo_window, GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
+   gtk_window_set_decorated (GTK_WINDOW (demo_window), FALSE);
+-
++*/
+   top_vbox = gtk_vbox_new (FALSE, 0);
+   gtk_widget_show (top_vbox);
++  demo_window = top_vbox;
++
++/*
+   gtk_container_add (GTK_CONTAINER (demo_window), top_vbox);
++*/
+   menubar1 = gtk_menu_bar_new ();
+   gtk_widget_show (menubar1);
+@@ -340,6 +344,8 @@
+                     NULL);
+   /* Store pointers to all widgets, for use by lookup_widget(). */
++
++/*
+   GLADE_HOOKUP_OBJECT_NO_REF (demo_window, demo_window, "demo_window");
+   GLADE_HOOKUP_OBJECT (demo_window, top_vbox, "top_vbox");
+   GLADE_HOOKUP_OBJECT (demo_window, menubar1, "menubar1");
+@@ -367,7 +373,9 @@
+   GLADE_HOOKUP_OBJECT (demo_window, toolbutton3, "toolbutton3");
+   GLADE_HOOKUP_OBJECT (demo_window, notebook2, "notebook2");
+   GLADE_HOOKUP_OBJECT (demo_window, scrolledwindow4, "scrolledwindow4");
++*/
+   GLADE_HOOKUP_OBJECT (demo_window, icon_view, "icon_view");
++/*
+   GLADE_HOOKUP_OBJECT (demo_window, label12, "label12");
+   GLADE_HOOKUP_OBJECT (demo_window, hbox2, "hbox2");
+   GLADE_HOOKUP_OBJECT (demo_window, frame2, "frame2");
+@@ -391,13 +399,15 @@
+   GLADE_HOOKUP_OBJECT (demo_window, text_view, "text_view");
+   GLADE_HOOKUP_OBJECT (demo_window, label14, "label14");
+   GLADE_HOOKUP_OBJECT (demo_window, scrolledwindow6, "scrolledwindow6");
++*/
+   GLADE_HOOKUP_OBJECT (demo_window, demo_treeview, "demo_treeview");
++/*
+   GLADE_HOOKUP_OBJECT (demo_window, label17, "label17");
+   GLADE_HOOKUP_OBJECT (demo_window, statusbar1, "statusbar1");
+   GLADE_HOOKUP_OBJECT_NO_REF (demo_window, tooltips, "tooltips");
+   gtk_window_add_accel_group (GTK_WINDOW (demo_window), accel_group);
+-
++*/
+   return demo_window;
+ }
diff --git a/src/demo.c b/src/demo.c
new file mode 100644 (file)
index 0000000..6ad28e3
--- /dev/null
@@ -0,0 +1,63 @@
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+
+#include "demo.h"
+#include "demo-ui.h"
+#include "glade-support.h"
+
+static GtkIconView* icon_view = NULL;
+
+static void load_demo_icons()
+{
+    static const char** icon_names[]={
+        "gnome-fs-home",
+        "gnome-fs-desktop",
+        "gnome-fs-directory",
+        "gnome-fs-trash-empty",
+        "gnome-fs-regular",
+        "gnome-fs-executable",
+        "gnome-mime-image",
+        "gnome-mime-text"
+    };
+
+    int i;
+    GtkIconTheme* theme = gtk_icon_theme_get_default();
+    GtkListStore* demo_icon_list;
+
+    demo_icon_list = gtk_list_store_new( 2, GDK_TYPE_PIXBUF, G_TYPE_STRING );
+
+    for( i = 0; i < G_N_ELEMENTS(icon_names); ++i )
+    {
+        GtkTreeIter it;
+        GdkPixbuf* icon = gtk_icon_theme_load_icon( theme, icon_names[i], 32, 0, NULL );
+        gtk_list_store_append( demo_icon_list, &it );
+        gtk_list_store_set( demo_icon_list, &it, 0, icon, 1, icon_names[i], -1 );
+        if( icon )
+            g_object_unref( icon );
+    }
+    gtk_icon_view_set_model( icon_view, demo_icon_list );
+    g_object_unref( demo_icon_list );
+}
+
+void show_demo( GdkNativeWindow wid )
+{
+    GtkWidget* demo = create_demo_window();
+    GtkWidget* plug = gtk_plug_new( wid );
+    GtkWidget* top_vbox;
+
+    icon_view = lookup_widget( demo, "icon_view" );
+    gtk_widget_show_all( demo );
+    gtk_container_add( (GtkContainer*)plug, demo );
+
+    gtk_widget_show( plug );
+    gtk_icon_view_set_pixbuf_column( icon_view, 0 );
+    gtk_icon_view_set_text_column( icon_view, 1 );
+    gtk_icon_view_set_item_width( icon_view, 64 );
+    gtk_icon_view_set_column_spacing( icon_view, 8 );
+    gtk_icon_view_set_row_spacing( icon_view, 8 );
+
+    load_demo_icons();
+}
diff --git a/src/demo.h b/src/demo.h
new file mode 100644 (file)
index 0000000..16665dc
--- /dev/null
@@ -0,0 +1,8 @@
+#ifndef _DEMO_H_
+#define _DEMO_H_
+
+#include <gtk/gtk.h>
+
+void show_demo( GdkNativeWindow wid );
+
+#endif
index 7519a95..e413004 100644 (file)
@@ -52,69 +52,9 @@ create_dlg (void)
   GtkWidget *label15;
   GtkWidget *frame1;
   GtkWidget *demo_box;
   GtkWidget *label15;
   GtkWidget *frame1;
   GtkWidget *demo_box;
-  GtkWidget *top_vbox;
-  GtkWidget *menubar1;
-  GtkWidget *menuitem1;
-  GtkWidget *menuitem1_menu;
-  GtkWidget *new1;
-  GtkWidget *open1;
-  GtkWidget *save1;
-  GtkWidget *save_as1;
-  GtkWidget *separatormenuitem1;
-  GtkWidget *quit1;
-  GtkWidget *menuitem2;
-  GtkWidget *menuitem2_menu;
-  GtkWidget *cut1;
-  GtkWidget *copy1;
-  GtkWidget *paste1;
-  GtkWidget *delete1;
-  GtkWidget *menuitem4;
-  GtkWidget *menuitem4_menu;
-  GtkWidget *about1;
-  GtkWidget *handlebox1;
-  GtkWidget *toolbar1;
-  GtkIconSize tmp_toolbar_icon_size;
-  GtkWidget *toolbutton1;
-  GtkWidget *toolbutton2;
-  GtkWidget *toolbutton3;
-  GtkWidget *notebook2;
-  GtkWidget *scrolledwindow4;
-  GtkWidget *icon_view;
-  GtkWidget *label12;
-  GtkWidget *hbox2;
-  GtkWidget *frame2;
-  GtkWidget *alignment2;
-  GtkWidget *vbox6;
-  GtkWidget *radiobutton1;
-  GSList *radiobutton1_group = NULL;
-  GtkWidget *radiobutton2;
-  GSList *radiobutton2_group = NULL;
-  GtkWidget *hseparator1;
-  GtkWidget *checkbutton1;
-  GtkWidget *entry1;
-  GtkWidget *label16;
-  GtkWidget *vbox7;
-  GtkWidget *progressbar1;
-  GtkWidget *hscale1;
-  GtkWidget *hbox3;
-  GtkObject *spinbutton1_adj;
-  GtkWidget *spinbutton1;
-  GtkWidget *button1;
-  GtkWidget *combobox2;
-  GtkWidget *label13;
-  GtkWidget *scrolledwindow5;
-  GtkWidget *text_view;
-  GtkWidget *label14;
-  GtkWidget *statusbar1;
   GtkWidget *dialog_action_area1;
   GtkWidget *apply;
   GtkWidget *closebutton1;
   GtkWidget *dialog_action_area1;
   GtkWidget *apply;
   GtkWidget *closebutton1;
-  GtkAccelGroup *accel_group;
-  GtkTooltips *tooltips;
-
-  tooltips = gtk_tooltips_new ();
-
-  accel_group = gtk_accel_group_new ();
 
   dlg = gtk_dialog_new ();
   gtk_window_set_title (GTK_WINDOW (dlg), _("Appearance Settings"));
 
   dlg = gtk_dialog_new ();
   gtk_window_set_title (GTK_WINDOW (dlg), _("Appearance Settings"));
@@ -219,230 +159,6 @@ create_dlg (void)
   gtk_container_add (GTK_CONTAINER (frame1), demo_box);
   gtk_alignment_set_padding (GTK_ALIGNMENT (demo_box), 0, 0, 4, 4);
 
   gtk_container_add (GTK_CONTAINER (frame1), demo_box);
   gtk_alignment_set_padding (GTK_ALIGNMENT (demo_box), 0, 0, 4, 4);
 
-  top_vbox = gtk_vbox_new (FALSE, 0);
-  gtk_widget_show (top_vbox);
-  gtk_container_add (GTK_CONTAINER (demo_box), top_vbox);
-
-  menubar1 = gtk_menu_bar_new ();
-  gtk_widget_show (menubar1);
-  gtk_box_pack_start (GTK_BOX (top_vbox), menubar1, FALSE, FALSE, 0);
-
-  menuitem1 = gtk_menu_item_new_with_mnemonic (_("_File"));
-  gtk_widget_show (menuitem1);
-  gtk_container_add (GTK_CONTAINER (menubar1), menuitem1);
-
-  menuitem1_menu = gtk_menu_new ();
-  gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem1), menuitem1_menu);
-
-  new1 = gtk_image_menu_item_new_from_stock ("gtk-new", accel_group);
-  gtk_widget_show (new1);
-  gtk_container_add (GTK_CONTAINER (menuitem1_menu), new1);
-
-  open1 = gtk_image_menu_item_new_from_stock ("gtk-open", accel_group);
-  gtk_widget_show (open1);
-  gtk_container_add (GTK_CONTAINER (menuitem1_menu), open1);
-
-  save1 = gtk_image_menu_item_new_from_stock ("gtk-save", accel_group);
-  gtk_widget_show (save1);
-  gtk_container_add (GTK_CONTAINER (menuitem1_menu), save1);
-
-  save_as1 = gtk_image_menu_item_new_from_stock ("gtk-save-as", accel_group);
-  gtk_widget_show (save_as1);
-  gtk_container_add (GTK_CONTAINER (menuitem1_menu), save_as1);
-
-  separatormenuitem1 = gtk_separator_menu_item_new ();
-  gtk_widget_show (separatormenuitem1);
-  gtk_container_add (GTK_CONTAINER (menuitem1_menu), separatormenuitem1);
-  gtk_widget_set_sensitive (separatormenuitem1, FALSE);
-
-  quit1 = gtk_image_menu_item_new_from_stock ("gtk-quit", accel_group);
-  gtk_widget_show (quit1);
-  gtk_container_add (GTK_CONTAINER (menuitem1_menu), quit1);
-
-  menuitem2 = gtk_menu_item_new_with_mnemonic (_("_Edit"));
-  gtk_widget_show (menuitem2);
-  gtk_container_add (GTK_CONTAINER (menubar1), menuitem2);
-
-  menuitem2_menu = gtk_menu_new ();
-  gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem2), menuitem2_menu);
-
-  cut1 = gtk_image_menu_item_new_from_stock ("gtk-cut", accel_group);
-  gtk_widget_show (cut1);
-  gtk_container_add (GTK_CONTAINER (menuitem2_menu), cut1);
-
-  copy1 = gtk_image_menu_item_new_from_stock ("gtk-copy", accel_group);
-  gtk_widget_show (copy1);
-  gtk_container_add (GTK_CONTAINER (menuitem2_menu), copy1);
-
-  paste1 = gtk_image_menu_item_new_from_stock ("gtk-paste", accel_group);
-  gtk_widget_show (paste1);
-  gtk_container_add (GTK_CONTAINER (menuitem2_menu), paste1);
-
-  delete1 = gtk_image_menu_item_new_from_stock ("gtk-delete", accel_group);
-  gtk_widget_show (delete1);
-  gtk_container_add (GTK_CONTAINER (menuitem2_menu), delete1);
-
-  menuitem4 = gtk_menu_item_new_with_mnemonic (_("_Help"));
-  gtk_widget_show (menuitem4);
-  gtk_container_add (GTK_CONTAINER (menubar1), menuitem4);
-
-  menuitem4_menu = gtk_menu_new ();
-  gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem4), menuitem4_menu);
-
-  about1 = gtk_image_menu_item_new_from_stock ("gtk-about", accel_group);
-  gtk_widget_show (about1);
-  gtk_container_add (GTK_CONTAINER (menuitem4_menu), about1);
-
-  handlebox1 = gtk_handle_box_new ();
-  gtk_widget_show (handlebox1);
-  gtk_box_pack_start (GTK_BOX (top_vbox), handlebox1, FALSE, FALSE, 0);
-
-  toolbar1 = gtk_toolbar_new ();
-  gtk_widget_show (toolbar1);
-  gtk_container_add (GTK_CONTAINER (handlebox1), toolbar1);
-  gtk_toolbar_set_style (GTK_TOOLBAR (toolbar1), GTK_TOOLBAR_BOTH);
-  gtk_toolbar_set_show_arrow (GTK_TOOLBAR (toolbar1), FALSE);
-  tmp_toolbar_icon_size = gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar1));
-
-  toolbutton1 = (GtkWidget*) gtk_tool_button_new_from_stock ("gtk-go-back");
-  gtk_widget_show (toolbutton1);
-  gtk_container_add (GTK_CONTAINER (toolbar1), toolbutton1);
-  gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (toolbutton1), tooltips, _("Back"), NULL);
-
-  toolbutton2 = (GtkWidget*) gtk_tool_button_new_from_stock ("gtk-go-forward");
-  gtk_widget_show (toolbutton2);
-  gtk_container_add (GTK_CONTAINER (toolbar1), toolbutton2);
-  gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (toolbutton2), tooltips, _("Forward"), NULL);
-
-  toolbutton3 = (GtkWidget*) gtk_tool_button_new_from_stock ("gtk-stop");
-  gtk_widget_show (toolbutton3);
-  gtk_container_add (GTK_CONTAINER (toolbar1), toolbutton3);
-  gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (toolbutton3), tooltips, _("Stop"), NULL);
-
-  notebook2 = gtk_notebook_new ();
-  gtk_widget_show (notebook2);
-  gtk_box_pack_start (GTK_BOX (top_vbox), notebook2, TRUE, TRUE, 0);
-
-  scrolledwindow4 = gtk_scrolled_window_new (NULL, NULL);
-  gtk_widget_show (scrolledwindow4);
-  gtk_container_add (GTK_CONTAINER (notebook2), scrolledwindow4);
-  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow4), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow4), GTK_SHADOW_IN);
-
-  icon_view = gtk_icon_view_new ();
-  gtk_widget_show (icon_view);
-  gtk_container_add (GTK_CONTAINER (scrolledwindow4), icon_view);
-
-  label12 = gtk_label_new (_("Tab1"));
-  gtk_widget_show (label12);
-  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 0), label12);
-
-  hbox2 = gtk_hbox_new (FALSE, 0);
-  gtk_widget_show (hbox2);
-  gtk_container_add (GTK_CONTAINER (notebook2), hbox2);
-
-  frame2 = gtk_frame_new (NULL);
-  gtk_widget_show (frame2);
-  gtk_box_pack_start (GTK_BOX (hbox2), frame2, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frame2), 4);
-
-  alignment2 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment2);
-  gtk_container_add (GTK_CONTAINER (frame2), alignment2);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment2), 0, 4, 4, 0);
-
-  vbox6 = gtk_vbox_new (FALSE, 4);
-  gtk_widget_show (vbox6);
-  gtk_container_add (GTK_CONTAINER (alignment2), vbox6);
-
-  radiobutton1 = gtk_radio_button_new_with_mnemonic (NULL, _("Radio Button"));
-  gtk_widget_show (radiobutton1);
-  gtk_box_pack_start (GTK_BOX (vbox6), radiobutton1, FALSE, FALSE, 0);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton1), radiobutton1_group);
-  radiobutton1_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton1));
-
-  radiobutton2 = gtk_radio_button_new_with_mnemonic (NULL, _("Radio Button"));
-  gtk_widget_show (radiobutton2);
-  gtk_box_pack_start (GTK_BOX (vbox6), radiobutton2, FALSE, FALSE, 0);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton2), radiobutton2_group);
-  radiobutton2_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton2));
-
-  hseparator1 = gtk_hseparator_new ();
-  gtk_widget_show (hseparator1);
-  gtk_box_pack_start (GTK_BOX (vbox6), hseparator1, FALSE, TRUE, 0);
-
-  checkbutton1 = gtk_check_button_new_with_mnemonic (_("Check Button"));
-  gtk_widget_show (checkbutton1);
-  gtk_box_pack_start (GTK_BOX (vbox6), checkbutton1, FALSE, FALSE, 0);
-
-  entry1 = gtk_entry_new ();
-  gtk_widget_show (entry1);
-  gtk_box_pack_start (GTK_BOX (vbox6), entry1, FALSE, FALSE, 0);
-  gtk_entry_set_invisible_char (GTK_ENTRY (entry1), 9679);
-
-  label16 = gtk_label_new (_("Demo"));
-  gtk_widget_show (label16);
-  gtk_frame_set_label_widget (GTK_FRAME (frame2), label16);
-  gtk_label_set_use_markup (GTK_LABEL (label16), TRUE);
-
-  vbox7 = gtk_vbox_new (FALSE, 0);
-  gtk_widget_show (vbox7);
-  gtk_box_pack_start (GTK_BOX (hbox2), vbox7, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (vbox7), 4);
-
-  progressbar1 = gtk_progress_bar_new ();
-  gtk_widget_show (progressbar1);
-  gtk_box_pack_start (GTK_BOX (vbox7), progressbar1, FALSE, FALSE, 0);
-  gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (progressbar1), 0.6);
-  gtk_progress_bar_set_text (GTK_PROGRESS_BAR (progressbar1), "60 %");
-
-  hscale1 = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (0, 0, 0, 0, 0, 0)));
-  gtk_widget_show (hscale1);
-  gtk_box_pack_start (GTK_BOX (vbox7), hscale1, FALSE, TRUE, 0);
-
-  hbox3 = gtk_hbox_new (FALSE, 0);
-  gtk_widget_show (hbox3);
-  gtk_box_pack_start (GTK_BOX (vbox7), hbox3, FALSE, TRUE, 0);
-
-  spinbutton1_adj = gtk_adjustment_new (1, 0, 100, 1, 10, 10);
-  spinbutton1 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton1_adj), 1, 0);
-  gtk_widget_show (spinbutton1);
-  gtk_box_pack_start (GTK_BOX (hbox3), spinbutton1, TRUE, TRUE, 0);
-
-  button1 = gtk_button_new_with_mnemonic (_("button1"));
-  gtk_widget_show (button1);
-  gtk_box_pack_start (GTK_BOX (hbox3), button1, FALSE, FALSE, 0);
-
-  combobox2 = gtk_combo_box_new_text ();
-  gtk_widget_show (combobox2);
-  gtk_box_pack_start (GTK_BOX (vbox7), combobox2, FALSE, TRUE, 0);
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combobox2), _("Test Item 1"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combobox2), _("Test Item 2"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combobox2), _("Test Item 3"));
-
-  label13 = gtk_label_new (_("Tab2"));
-  gtk_widget_show (label13);
-  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 1), label13);
-
-  scrolledwindow5 = gtk_scrolled_window_new (NULL, NULL);
-  gtk_widget_show (scrolledwindow5);
-  gtk_container_add (GTK_CONTAINER (notebook2), scrolledwindow5);
-  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow5), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow5), GTK_SHADOW_IN);
-
-  text_view = gtk_text_view_new ();
-  gtk_widget_show (text_view);
-  gtk_container_add (GTK_CONTAINER (scrolledwindow5), text_view);
-  gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (text_view)), _("Type some characters here to test currently selected font."), -1);
-
-  label14 = gtk_label_new (_("Tab3"));
-  gtk_widget_show (label14);
-  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 2), label14);
-
-  statusbar1 = gtk_statusbar_new ();
-  gtk_widget_show (statusbar1);
-  gtk_box_pack_start (GTK_BOX (top_vbox), statusbar1, FALSE, FALSE, 0);
-
   dialog_action_area1 = GTK_DIALOG (dlg)->action_area;
   gtk_widget_show (dialog_action_area1);
   gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);
   dialog_action_area1 = GTK_DIALOG (dlg)->action_area;
   gtk_widget_show (dialog_action_area1);
   gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);
@@ -463,9 +179,6 @@ create_dlg (void)
   g_signal_connect ((gpointer) font, "font_set",
                     G_CALLBACK (on_font_changed),
                     NULL);
   g_signal_connect ((gpointer) font, "font_set",
                     G_CALLBACK (on_font_changed),
                     NULL);
-  g_signal_connect ((gpointer) top_vbox, "destroy",
-                    G_CALLBACK (gtk_main_quit),
-                    NULL);
   g_signal_connect ((gpointer) apply, "clicked",
                     G_CALLBACK (on_apply_clicked),
                     NULL);
   g_signal_connect ((gpointer) apply, "clicked",
                     G_CALLBACK (on_apply_clicked),
                     NULL);
@@ -498,62 +211,9 @@ create_dlg (void)
   GLADE_HOOKUP_OBJECT (dlg, label15, "label15");
   GLADE_HOOKUP_OBJECT (dlg, frame1, "frame1");
   GLADE_HOOKUP_OBJECT (dlg, demo_box, "demo_box");
   GLADE_HOOKUP_OBJECT (dlg, label15, "label15");
   GLADE_HOOKUP_OBJECT (dlg, frame1, "frame1");
   GLADE_HOOKUP_OBJECT (dlg, demo_box, "demo_box");
-  GLADE_HOOKUP_OBJECT (dlg, top_vbox, "top_vbox");
-  GLADE_HOOKUP_OBJECT (dlg, menubar1, "menubar1");
-  GLADE_HOOKUP_OBJECT (dlg, menuitem1, "menuitem1");
-  GLADE_HOOKUP_OBJECT (dlg, menuitem1_menu, "menuitem1_menu");
-  GLADE_HOOKUP_OBJECT (dlg, new1, "new1");
-  GLADE_HOOKUP_OBJECT (dlg, open1, "open1");
-  GLADE_HOOKUP_OBJECT (dlg, save1, "save1");
-  GLADE_HOOKUP_OBJECT (dlg, save_as1, "save_as1");
-  GLADE_HOOKUP_OBJECT (dlg, separatormenuitem1, "separatormenuitem1");
-  GLADE_HOOKUP_OBJECT (dlg, quit1, "quit1");
-  GLADE_HOOKUP_OBJECT (dlg, menuitem2, "menuitem2");
-  GLADE_HOOKUP_OBJECT (dlg, menuitem2_menu, "menuitem2_menu");
-  GLADE_HOOKUP_OBJECT (dlg, cut1, "cut1");
-  GLADE_HOOKUP_OBJECT (dlg, copy1, "copy1");
-  GLADE_HOOKUP_OBJECT (dlg, paste1, "paste1");
-  GLADE_HOOKUP_OBJECT (dlg, delete1, "delete1");
-  GLADE_HOOKUP_OBJECT (dlg, menuitem4, "menuitem4");
-  GLADE_HOOKUP_OBJECT (dlg, menuitem4_menu, "menuitem4_menu");
-  GLADE_HOOKUP_OBJECT (dlg, about1, "about1");
-  GLADE_HOOKUP_OBJECT (dlg, handlebox1, "handlebox1");
-  GLADE_HOOKUP_OBJECT (dlg, toolbar1, "toolbar1");
-  GLADE_HOOKUP_OBJECT (dlg, toolbutton1, "toolbutton1");
-  GLADE_HOOKUP_OBJECT (dlg, toolbutton2, "toolbutton2");
-  GLADE_HOOKUP_OBJECT (dlg, toolbutton3, "toolbutton3");
-  GLADE_HOOKUP_OBJECT (dlg, notebook2, "notebook2");
-  GLADE_HOOKUP_OBJECT (dlg, scrolledwindow4, "scrolledwindow4");
-  GLADE_HOOKUP_OBJECT (dlg, icon_view, "icon_view");
-  GLADE_HOOKUP_OBJECT (dlg, label12, "label12");
-  GLADE_HOOKUP_OBJECT (dlg, hbox2, "hbox2");
-  GLADE_HOOKUP_OBJECT (dlg, frame2, "frame2");
-  GLADE_HOOKUP_OBJECT (dlg, alignment2, "alignment2");
-  GLADE_HOOKUP_OBJECT (dlg, vbox6, "vbox6");
-  GLADE_HOOKUP_OBJECT (dlg, radiobutton1, "radiobutton1");
-  GLADE_HOOKUP_OBJECT (dlg, radiobutton2, "radiobutton2");
-  GLADE_HOOKUP_OBJECT (dlg, hseparator1, "hseparator1");
-  GLADE_HOOKUP_OBJECT (dlg, checkbutton1, "checkbutton1");
-  GLADE_HOOKUP_OBJECT (dlg, entry1, "entry1");
-  GLADE_HOOKUP_OBJECT (dlg, label16, "label16");
-  GLADE_HOOKUP_OBJECT (dlg, vbox7, "vbox7");
-  GLADE_HOOKUP_OBJECT (dlg, progressbar1, "progressbar1");
-  GLADE_HOOKUP_OBJECT (dlg, hscale1, "hscale1");
-  GLADE_HOOKUP_OBJECT (dlg, hbox3, "hbox3");
-  GLADE_HOOKUP_OBJECT (dlg, spinbutton1, "spinbutton1");
-  GLADE_HOOKUP_OBJECT (dlg, button1, "button1");
-  GLADE_HOOKUP_OBJECT (dlg, combobox2, "combobox2");
-  GLADE_HOOKUP_OBJECT (dlg, label13, "label13");
-  GLADE_HOOKUP_OBJECT (dlg, scrolledwindow5, "scrolledwindow5");
-  GLADE_HOOKUP_OBJECT (dlg, text_view, "text_view");
-  GLADE_HOOKUP_OBJECT (dlg, label14, "label14");
-  GLADE_HOOKUP_OBJECT (dlg, statusbar1, "statusbar1");
   GLADE_HOOKUP_OBJECT_NO_REF (dlg, dialog_action_area1, "dialog_action_area1");
   GLADE_HOOKUP_OBJECT (dlg, apply, "apply");
   GLADE_HOOKUP_OBJECT (dlg, closebutton1, "closebutton1");
   GLADE_HOOKUP_OBJECT_NO_REF (dlg, dialog_action_area1, "dialog_action_area1");
   GLADE_HOOKUP_OBJECT (dlg, apply, "apply");
   GLADE_HOOKUP_OBJECT (dlg, closebutton1, "closebutton1");
-  GLADE_HOOKUP_OBJECT_NO_REF (dlg, tooltips, "tooltips");
-
-  gtk_window_add_accel_group (GTK_WINDOW (dlg), accel_group);
 
   return dlg;
 }
 
   return dlg;
 }
index f5f474d..79e326e 100644 (file)
@@ -41,9 +41,43 @@ static char* rc_file = NULL;
 static GtkTreeView* font_view = NULL;
 static GtkListStore* font_list = NULL;
 */
 static GtkTreeView* font_view = NULL;
 static GtkListStore* font_list = NULL;
 */
+static GtkWidget* demo_box = NULL;
 static GtkWidget* demo_socket = NULL;
 static GPid demo_pid = 0;
 
 static GtkWidget* demo_socket = NULL;
 static GPid demo_pid = 0;
 
+static void load_demo_process()
+{
+    char* argv[5];
+    char wid[16];
+
+    if( demo_pid > 0 ) /* kill old demo */
+    {
+        int stat;
+//        if( demo_socket )
+//            gtk_widget_destroy( demo_socket );
+        kill( demo_pid, SIGTERM );
+        waitpid( demo_pid, &stat, 0 );
+        demo_pid = 0;
+    }
+
+    if( !demo_socket )
+    {
+        demo_socket = gtk_socket_new();
+        g_signal_connect( demo_socket, "plug-removed", G_CALLBACK(gtk_true), NULL );
+        gtk_widget_show( demo_socket );
+        gtk_container_add( (GtkContainer*)demo_box, demo_socket );
+    }
+
+    g_snprintf( wid, 16, "%ld", gtk_socket_get_id(demo_socket) );
+
+    argv[0] = g_get_prgname();
+    argv[1] = "demo";
+    argv[2] = wid;
+    argv[3] = tmp_rc_file;
+    argv[4] = NULL;
+    g_spawn_async(NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, &demo_pid, NULL );
+}
+
 static void write_rc_file( const char* path )
 {
     FILE* f;
 static void write_rc_file( const char* path )
 {
     FILE* f;
@@ -91,7 +125,8 @@ static void on_list_sel_changed( GtkTreeSelection* sel, const char* prop )
             icon_theme_name = name;
         }
         write_rc_file( tmp_rc_file );
             icon_theme_name = name;
         }
         write_rc_file( tmp_rc_file );
-        gtk_rc_reparse_all_for_settings(gtk_settings_get_default(), TRUE);
+        //gtk_rc_reparse_all_for_settings(gtk_settings_get_default(), TRUE);
+        load_demo_process();
         return;
     out:
         g_free( name );
         return;
     out:
         g_free( name );
@@ -192,25 +227,8 @@ static void load_fonts( GtkListStore* list )
 }
 */
 
 }
 */
 
-static void load_demo_process()
-{
-    char* argv[]={ NULL, "demo", NULL, NULL };
-    char wid[16];
-
-    if( demo_pid > 0 ) /* kill old demo */
-    {
-
-    }
-    g_snprintf( wid, 16, "%ld", gtk_socket_get_id(demo_socket) );
-
-    argv[0] = g_get_prgname();
-    argv[2] = wid;
-    g_spawn_async(NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, &demo_pid, NULL );
-}
-
 void main_dlg_init( GtkWidget* dlg )
 {
 void main_dlg_init( GtkWidget* dlg )
 {
-    GtkWidget* demo_box;
     char* files[] = { tmp_rc_file, NULL };
     char** def_files = gtk_rc_get_default_files();
     char** file;
     char* files[] = { tmp_rc_file, NULL };
     char** def_files = gtk_rc_get_default_files();
     char** file;
@@ -236,25 +254,20 @@ void main_dlg_init( GtkWidget* dlg )
     if( ! font_name )
         font_name = g_strdup( "Sans 10" );
 
     if( ! font_name )
         font_name = g_strdup( "Sans 10" );
 
-    gtk_rc_set_default_files( files );
     write_rc_file( tmp_rc_file );
     write_rc_file( tmp_rc_file );
-    gtk_rc_reparse_all();
 
     INIT_LIST( gtk_theme, "gtk-theme-name" )
     INIT_LIST( icon_theme, "gtk-icon-theme-name" )
     gtk_font_button_set_font_name( (GtkFontButton*)lookup_widget(dlg, "font"), font_name );
 
     /* INIT_LIST( font, "gtk-font-name" ) */
 
     INIT_LIST( gtk_theme, "gtk-theme-name" )
     INIT_LIST( icon_theme, "gtk-icon-theme-name" )
     gtk_font_button_set_font_name( (GtkFontButton*)lookup_widget(dlg, "font"), font_name );
 
     /* INIT_LIST( font, "gtk-font-name" ) */
-/*
+
     GET_WIDGET( demo_box );
     GET_WIDGET( demo_box );
-    demo_socket = gtk_socket_new();
-    gtk_widget_show( demo_socket );
+
     gtk_widget_show( demo_box );
     gtk_widget_show( demo_box );
-    gtk_widget_set_app_paintable( demo_socket, TRUE );
-    gtk_container_add( (GtkContainer*)demo_box, demo_socket );
+//    gtk_widget_set_app_paintable( demo_socket, TRUE );
     gtk_widget_realize( dlg );
     load_demo_process();
     gtk_widget_realize( dlg );
     load_demo_process();
-*/
 }
 
 static void reload_all_programs( gboolean icon_only )
 }
 
 static void reload_all_programs( gboolean icon_only )
@@ -292,6 +305,6 @@ on_font_changed                        (GtkFontButton   *fontbutton,
     g_free( font_name );
     font_name = g_strdup( name );
     write_rc_file( tmp_rc_file );
     g_free( font_name );
     font_name = g_strdup( name );
     write_rc_file( tmp_rc_file );
-    gtk_rc_reparse_all_for_settings( gtk_settings_get_default(), TRUE );
+    load_demo_process();
 }
 
 }
 
index c02533b..e0dad15 100644 (file)
@@ -24,16 +24,21 @@ int main (int argc, char *argv[])
     textdomain (GETTEXT_PACKAGE);
 #endif
 
     textdomain (GETTEXT_PACKAGE);
 #endif
 
-    gtk_set_locale ();
-    gtk_init (&argc, &argv);
-
     if( argc >= 3 && strcmp( argv[1], "demo" ) == 0 )
     {
     if( argc >= 3 && strcmp( argv[1], "demo" ) == 0 )
     {
+        char* files[] = { argv[3], NULL };
+        gtk_rc_set_default_files(files);
+
+        gtk_set_locale ();
+        gtk_init (&argc, &argv);
         show_demo( (GdkNativeWindow)atoi( argv[2] ) );
         gtk_main();
         return 0;
     }
 
         show_demo( (GdkNativeWindow)atoi( argv[2] ) );
         gtk_main();
         return 0;
     }
 
+    gtk_set_locale ();
+    gtk_init (&argc, &argv);
+
     dlg = create_dlg ();
     main_dlg_init( dlg );
     gtk_widget_show (dlg);
     dlg = create_dlg ();
     main_dlg_init( dlg );
     gtk_widget_show (dlg);