gnome-utils r8548 - in trunk/baobab: . data src



Author: marzocca
Date: Fri Apr 10 17:12:22 2009
New Revision: 8548
URL: http://svn.gnome.org/viewvc/gnome-utils?rev=8548&view=rev

Log:
#578631

Added:
   trunk/baobab/data/baobab-dialog-scan-props.ui
   trunk/baobab/data/baobab-main-window.ui
Modified:
   trunk/baobab/ChangeLog
   trunk/baobab/src/gedit-spinner.c

Added: trunk/baobab/data/baobab-dialog-scan-props.ui
==============================================================================
--- (empty file)
+++ trunk/baobab/data/baobab-dialog-scan-props.ui	Fri Apr 10 17:12:22 2009
@@ -0,0 +1,179 @@
+<?xml version="1.0"?>
+<!--*- mode: xml -*-->
+<interface>
+  <object class="GtkDialog" id="dialog_scan_props">
+    <property name="border_width">5</property>
+    <property name="height_request">330</property>
+    <property name="visible">True</property>
+    <property name="title" translatable="yes">Disk Usage Analyzer Preferences</property>
+    <property name="type">GTK_WINDOW_TOPLEVEL</property>
+    <property name="window_position">GTK_WIN_POS_NONE</property>
+    <property name="modal">True</property>
+    <property name="resizable">True</property>
+    <property name="destroy_with_parent">False</property>
+    <property name="decorated">True</property>
+    <property name="skip_taskbar_hint">False</property>
+    <property name="skip_pager_hint">False</property>
+    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+    <property name="focus_on_map">True</property>
+    <property name="urgency_hint">False</property>
+    <property name="has_separator">False</property>
+    <child internal-child="vbox">
+      <object class="GtkVBox" id="dialog-vbox2">
+        <property name="visible">True</property>
+        <property name="homogeneous">False</property>
+        <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkHButtonBox" id="dialog-action_area2">
+            <property name="visible">True</property>
+            <property name="layout_style">GTK_BUTTONBOX_END</property>
+            <child>
+              <object class="GtkButton" id="helpbutton1">
+                <property name="visible">True</property>
+                <property name="can_default">True</property>
+                <property name="can_focus">True</property>
+                <property name="label">gtk-help</property>
+                <property name="use_stock">True</property>
+                <property name="relief">GTK_RELIEF_NORMAL</property>
+                <property name="focus_on_click">True</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="closebutton1">
+                <property name="visible">True</property>
+                <property name="can_default">True</property>
+                <property name="can_focus">True</property>
+                <property name="label">gtk-close</property>
+                <property name="use_stock">True</property>
+                <property name="relief">GTK_RELIEF_NORMAL</property>
+                <property name="focus_on_click">True</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="padding">0</property>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">GTK_PACK_END</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkVBox" id="vbox5">
+            <property name="border_width">5</property>
+            <property name="visible">True</property>
+            <property name="homogeneous">False</property>
+            <property name="spacing">6</property>
+            <child>
+              <object class="GtkAlignment" id="alignment3">
+                <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">0</property>
+                <property name="left_padding">0</property>
+                <property name="right_padding">0</property>
+                <child>
+                  <object class="GtkLabel" id="label100">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">Select _devices to include in filesystem scan:</property>
+                    <property name="use_underline">True</property>
+                    <property name="use_markup">False</property>
+                    <property name="justify">GTK_JUSTIFY_LEFT</property>
+                    <property name="wrap">False</property>
+                    <property name="selectable">False</property>
+                    <property name="xalign">0</property>
+                    <property name="yalign">0.5</property>
+                    <property name="xpad">0</property>
+                    <property name="ypad">0</property>
+                    <property name="mnemonic_widget">tree_view_props</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>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="padding">0</property>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <object 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">0</property>
+                <property name="left_padding">0</property>
+                <property name="right_padding">0</property>
+                <child>
+                  <object class="GtkScrolledWindow" id="scrolledwindow2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="hscrollbar_policy">GTK_POLICY_NEVER</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>
+                      <object class="GtkTreeView" id="tree_view_props">
+                        <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">False</property>
+                        <property name="fixed_height_mode">False</property>
+                        <property name="hover_selection">False</property>
+                        <property name="hover_expand">False</property>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="padding">0</property>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkCheckButton" id="check_enable_home">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="label" translatable="yes">_Monitor changes to your home folder</property>
+                <property name="use_underline">True</property>
+                <property name="relief">GTK_RELIEF_NORMAL</property>
+                <property name="focus_on_click">True</property>
+                <property name="active">True</property>
+                <property name="inconsistent">False</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="padding">0</property>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="padding">0</property>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="-11">helpbutton1</action-widget>
+      <action-widget response="-7">closebutton1</action-widget>
+    </action-widgets>
+  </object>
+</interface>
+

Added: trunk/baobab/data/baobab-main-window.ui
==============================================================================
--- (empty file)
+++ trunk/baobab/data/baobab-main-window.ui	Fri Apr 10 17:12:22 2009
@@ -0,0 +1,463 @@
+<?xml version="1.0"?>
+<!--*- mode: xml -*-->
+<interface>
+  <object class="GtkUIManager" id="uimanager1">
+    <child>
+      <object class="GtkActionGroup" id="actiongroup1">
+        <child>
+          <object class="GtkAction" id="menuitem1">
+            <property name="name">menuitem1</property>
+            <property name="label" translatable="yes">_Analyzer</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="menuscanhome">
+            <property name="stock_id">gtk-home</property>
+            <property name="name">menuscanhome</property>
+            <property name="label" translatable="yes">Scan _Home Folder</property>
+            <signal handler="on_menuscanhome_activate" last_modification_time="Wed, 23 Aug 2006 03:59:38 GMT" name="activate"/>
+          </object>
+          <accelerator key="S" modifiers="GDK_CONTROL_MASK"/>
+        </child>
+        <child>
+          <object class="GtkAction" id="menuallfs">
+            <property name="stock_id">gtk-harddisk</property>
+            <property name="name">menuallfs</property>
+            <property name="label" translatable="yes">Scan _Filesystem</property>
+            <signal handler="on_menuallfs_activate" last_modification_time="Tue, 05 Jul 2005 08:47:26 GMT" name="activate"/>
+          </object>
+          <accelerator key="F" modifiers="GDK_CONTROL_MASK"/>
+        </child>
+        <child>
+          <object class="GtkAction" id="menuscandir">
+            <property name="stock_id">gtk-directory</property>
+            <property name="name">menuscandir</property>
+            <property name="label" translatable="yes">Scan F_older...</property>
+            <signal handler="on_menuscandir_activate" last_modification_time="Tue, 05 Jul 2005 08:47:26 GMT" name="activate"/>
+          </object>
+          <accelerator key="O" modifiers="GDK_CONTROL_MASK"/>
+        </child>
+        <child>
+          <object class="GtkAction" id="menu_scan_rem">
+            <property name="stock_id">gtk-network</property>
+            <property name="name">menu_scan_rem</property>
+            <property name="label" translatable="yes">S_can Remote Folder...</property>
+            <signal handler="on_menu_scan_rem_activate" last_modification_time="Fri, 18 Nov 2005 18:20:25 GMT" name="activate"/>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="menustop">
+            <property name="stock_id">gtk-stop</property>
+            <property name="name">menustop</property>
+            <signal handler="on_menu_stop_activate" last_modification_time="Tue, 29 Aug 2006 04:04:57 GMT" name="activate"/>
+          </object>
+          <accelerator key="Escape" modifiers="0"/>
+        </child>
+        <child>
+          <object class="GtkAction" id="menurescan">
+            <property name="stock_id">gtk-refresh</property>
+            <property name="name">menurescan</property>
+            <signal handler="on_menu_rescan_activate" last_modification_time="Sat, 28 Oct 2006 14:27:31 GMT" name="activate"/>
+          </object>
+          <accelerator key="R" modifiers="GDK_CONTROL_MASK"/>
+        </child>
+        <child>
+          <object class="GtkAction" id="esci1">
+            <property name="stock_id">gtk-quit</property>
+            <property name="name">esci1</property>
+            <signal handler="on_esci1_activate" last_modification_time="Tue, 05 Jul 2005 08:47:26 GMT" name="activate"/>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="edit1">
+            <property name="name">edit1</property>
+            <property name="label" translatable="yes">_Edit</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="expand_all">
+            <property name="name">expand_all</property>
+            <property name="label" translatable="yes">_Expand All</property>
+            <signal handler="on_menu_expand_activate" last_modification_time="Wed, 23 Aug 2006 17:10:33 GMT" name="activate"/>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="collapse_all">
+            <property name="name">collapse_all</property>
+            <property name="label" translatable="yes">_Collapse All</property>
+            <signal handler="on_menu_collapse_activate" last_modification_time="Wed, 23 Aug 2006 17:13:24 GMT" name="activate"/>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="preferenze1">
+            <property name="stock_id">gtk-preferences</property>
+            <property name="name">preferenze1</property>
+            <signal handler="on_pref_menu" last_modification_time="Fri, 04 Nov 2005 11:19:35 GMT" name="activate"/>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="view1">
+            <property name="name">view1</property>
+            <property name="label" translatable="yes">_View</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkToggleAction" id="view_tb">
+            <property name="active">True</property>
+            <property name="name">view_tb</property>
+            <property name="label" translatable="yes">_Toolbar</property>
+            <signal handler="on_view_tb_activate" last_modification_time="Wed, 19 Apr 2006 12:10:25 GMT" name="activate"/>
+          </object>
+        </child>
+        <child>
+          <object class="GtkToggleAction" id="view_sb">
+            <property name="active">True</property>
+            <property name="name">view_sb</property>
+            <property name="label" translatable="yes">St_atusbar</property>
+            <signal handler="on_view_sb_activate" last_modification_time="Wed, 19 Apr 2006 12:45:08 GMT" name="activate"/>
+          </object>
+        </child>
+        <child>
+          <object class="GtkToggleAction" id="ck_allocated">
+            <property name="active">True</property>
+            <property name="name">ck_allocated</property>
+            <property name="label" translatable="yes">All_ocated Space</property>
+            <signal handler="on_ck_allocated_activate" last_modification_time="Mon, 21 Aug 2006 03:19:13 GMT" name="activate"/>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="help1">
+            <property name="name">help1</property>
+            <property name="label" translatable="yes">_Help</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="helpcontents">
+            <property name="stock_id">gtk-help</property>
+            <property name="name">helpcontents</property>
+            <property name="label" translatable="yes">_Contents</property>
+            <signal handler="on_helpcontents_activate" last_modification_time="Wed, 26 Apr 2006 07:44:52 GMT" name="activate"/>
+          </object>
+          <accelerator key="F1" modifiers="0"/>
+        </child>
+        <child>
+          <object class="GtkAction" id="about">
+            <property name="stock_id">gtk-about</property>
+            <property name="name">about</property>
+            <signal handler="on_about_activate" last_modification_time="Tue, 05 Jul 2005 08:58:33 GMT" name="activate"/>
+          </object>
+        </child>
+      </object>
+    </child>
+    <ui>
+      <menubar name="menubar1">
+        <menu action="menuitem1">
+          <menuitem action="menuscanhome"/>
+          <menuitem action="menuallfs"/>
+          <menuitem action="menuscandir"/>
+          <menuitem action="menu_scan_rem"/>
+          <separator/>
+          <menuitem action="menustop"/>
+          <menuitem action="menurescan"/>
+          <separator/>
+          <menuitem action="esci1"/>
+        </menu>
+        <menu action="edit1">
+          <menuitem action="expand_all"/>
+          <menuitem action="collapse_all"/>
+          <separator/>
+          <menuitem action="preferenze1"/>
+        </menu>
+        <menu action="view1">
+          <menuitem action="view_tb"/>
+          <menuitem action="view_sb"/>
+          <menuitem action="ck_allocated"/>
+        </menu>
+        <menu action="help1">
+          <menuitem action="helpcontents"/>
+          <menuitem action="about"/>
+        </menu>
+      </menubar>
+    </ui>
+  </object>
+  <object class="GtkWindow" id="baobab_window">
+    <property name="visible">True</property>
+    <property name="title" translatable="yes">Disk Usage Analyzer</property>
+    <property name="type">GTK_WINDOW_TOPLEVEL</property>
+    <property name="window_position">GTK_WIN_POS_CENTER</property>
+    <property name="modal">False</property>
+    <property name="default_width">800</property>
+    <property name="default_height">500</property>
+    <property name="resizable">True</property>
+    <property name="destroy_with_parent">False</property>
+    <property name="decorated">True</property>
+    <property name="skip_taskbar_hint">False</property>
+    <property name="skip_pager_hint">False</property>
+    <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+    <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+    <property name="focus_on_map">True</property>
+    <property name="urgency_hint">False</property>
+    <signal handler="on_esci1_activate" last_modification_time="Sun, 31 Jul 2005 16:47:41 GMT" name="destroy"/>
+    <signal handler="on_delete_activate" last_modification_time="Sun, 31 Jul 2005 16:53:49 GMT" name="delete_event"/>
+    <child>
+      <object class="GtkVBox" id="vbox1">
+        <property name="visible">True</property>
+        <property name="homogeneous">False</property>
+        <property name="spacing">0</property>
+        <child>
+          <object class="GtkMenuBar" constructor="uimanager1" 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>
+          </object>
+          <packing>
+            <property name="padding">0</property>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkToolbar" id="toolbar1">
+            <property name="visible">True</property>
+            <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
+            <property name="toolbar_style">GTK_TOOLBAR_ICONS</property>
+            <property name="tooltips">True</property>
+            <property name="show_arrow">False</property>
+            <child>
+              <object class="GtkToolButton" id="tbscanhome">
+                <property name="visible">True</property>
+                <property name="tooltip-text" translatable="yes">Scan home folder</property>
+                <property name="label" translatable="yes">Scan Home</property>
+                <property name="use_underline">True</property>
+                <property name="stock_id">gtk-home</property>
+                <property name="visible_horizontal">True</property>
+                <property name="visible_vertical">True</property>
+                <property name="is_important">True</property>
+                <accessibility>
+		
+	      </accessibility>
+                <signal handler="on_tbscanhome_clicked" last_modification_time="Wed, 23 Aug 2006 12:30:03 GMT" name="clicked"/>
+                <child internal-child="accessible">
+                  <object class="AtkObject" id="a11y-tbscanhome1">
+                    <property name="AtkObject::accessible_name" translatable="yes">Scan home folder</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="homogeneous">True</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkToolButton" id="tbscanall">
+                <property name="visible">True</property>
+                <property name="tooltip-text" translatable="yes">Scan filesystem</property>
+                <property name="label" translatable="yes">Scan Filesystem</property>
+                <property name="use_underline">True</property>
+                <property name="stock_id">gtk-harddisk</property>
+                <property name="visible_horizontal">True</property>
+                <property name="visible_vertical">True</property>
+                <property name="is_important">False</property>
+                <signal handler="on_tbscanall_clicked" last_modification_time="Sat, 09 Jul 2005 20:16:36 GMT" name="clicked"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="homogeneous">True</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkToolButton" id="tbscandir">
+                <property name="visible">True</property>
+                <property name="tooltip-text" translatable="yes">Scan a folder</property>
+                <property name="label" translatable="yes">Scan Folder</property>
+                <property name="use_underline">True</property>
+                <property name="stock_id">gtk-directory</property>
+                <property name="visible_horizontal">True</property>
+                <property name="visible_vertical">True</property>
+                <property name="is_important">False</property>
+                <signal handler="on_tbscandir_clicked" last_modification_time="Wed, 06 Jul 2005 13:15:40 GMT" name="clicked"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="homogeneous">True</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkToolButton" id="tb_scan_remote">
+                <property name="visible">True</property>
+                <property name="tooltip-text" translatable="yes">Scan a remote folder</property>
+                <property name="label" translatable="yes">Scan Remote Folder</property>
+                <property name="use_underline">True</property>
+                <property name="stock_id">gtk-network</property>
+                <property name="visible_horizontal">True</property>
+                <property name="visible_vertical">True</property>
+                <property name="is_important">False</property>
+                <signal handler="on_tb_scan_remote_clicked" last_modification_time="Fri, 18 Nov 2005 15:56:32 GMT" name="clicked"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="homogeneous">True</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkSeparatorToolItem" id="separatortoolitem4">
+                <property name="visible">True</property>
+                <property name="draw">True</property>
+                <property name="visible_horizontal">True</property>
+                <property name="visible_vertical">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="homogeneous">False</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkToolButton" id="tbstop">
+                <property name="visible">True</property>
+                <property name="sensitive">False</property>
+                <property name="tooltip-text" translatable="yes">Stop scanning</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>
+                <signal handler="on_tbstop_clicked" last_modification_time="Sat, 09 Jul 2005 16:03:18 GMT" name="clicked"/>
+                <accelerator key="Escape" modifiers="0" signal="clicked"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="homogeneous">True</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkToolButton" id="tbrescan">
+                <property name="visible">True</property>
+                <property name="tooltip-text" translatable="yes">Refresh</property>
+                <property name="sensitive">False</property>
+                <property name="stock_id">gtk-refresh</property>
+                <property name="visible_horizontal">True</property>
+                <property name="visible_vertical">True</property>
+                <property name="is_important">False</property>
+                <signal handler="on_tbrescan_clicked" last_modification_time="Sat, 28 Oct 2006 14:26:18 GMT" name="clicked"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="homogeneous">True</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="padding">0</property>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkVBox" id="vbox2">
+            <property name="visible">True</property>
+            <property name="homogeneous">False</property>
+            <property name="spacing">0</property>
+            <child>
+              <object class="GtkHBox" id="hbox1">
+                <property name="border_width">2</property>
+                <property name="visible">True</property>
+                <property name="homogeneous">False</property>
+                <property name="spacing">0</property>
+                <child>
+                  <object class="GtkLabel" id="label1">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes"/>
+                    <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.300000011921</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>
+                  </object>
+                  <packing>
+                    <property name="padding">0</property>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+              </object>
+              <packing>
+                <property name="padding">5</property>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkHPaned" id="hpaned_main">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <child>
+                  <object class="GtkScrolledWindow" id="scrolledwindow1">
+                    <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>
+                      <object class="GtkTreeView" id="treeview1">
+                        <property name="width_request">500</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="headers_visible">False</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>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="shrink">True</property>
+                    <property name="resize">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+              </object>
+              <packing>
+                <property name="padding">0</property>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="padding">0</property>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkStatusbar" id="statusbar1">
+            <property name="visible">True</property>
+            <property name="has_resize_grip">True</property>
+          </object>
+          <packing>
+            <property name="padding">0</property>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
+

Modified: trunk/baobab/src/gedit-spinner.c
==============================================================================
--- trunk/baobab/src/gedit-spinner.c	(original)
+++ trunk/baobab/src/gedit-spinner.c	Fri Apr 10 17:12:22 2009
@@ -84,14 +84,13 @@
 	GtkIconSize  size;
 	gint         width;
 	gint         height;
-	GdkPixbuf   *quiescent_pixbuf;
 	GdkPixbuf  **animation_pixbufs;
 	guint        n_animation_pixbufs;
 } GeditSpinnerImages;
 
 #define LAST_ICON_SIZE			GTK_ICON_SIZE_DIALOG + 1
 #define SPINNER_ICON_NAME		"process-working"
-#define SPINNER_REST_ICON_NAME		"process-idle"
+#define SPINNER_FALLBACK_ICON_NAME	"gnome-spinner"
 #define GEDIT_SPINNER_IMAGES_INVALID	((GeditSpinnerImages *) 0x1)
 
 typedef struct
@@ -162,8 +161,6 @@
 		}
 		g_free (images->animation_pixbufs);
 
-		g_object_unref (images->quiescent_pixbuf);
-
 		g_free (images);
 	}
 }
@@ -242,7 +239,6 @@
 			   GtkIconSize icon_size)
 {
 	GeditSpinnerImages *images;
-	GdkPixbuf *rest_pixbuf = NULL;
 	GdkPixbuf *icon_pixbuf, *pixbuf;
 	GtkIconInfo *icon_info = NULL;
 	int grid_width, grid_height, x, y, requested_size, size, isw, ish, n;
@@ -259,45 +255,26 @@
  
 	requested_size = MAX (ish, isw);
 
-	/* Load the rest icon */
+	/* Load the animation. The 'rest icon' is the 0th frame */
 	icon_info = gtk_icon_theme_lookup_icon (icon_theme,
-						SPINNER_REST_ICON_NAME,
+						SPINNER_ICON_NAME,
 						requested_size, 0);
 	if (icon_info == NULL)
 	{
-		g_warning ("Throbber rest icon not found");
-		goto loser;
-	}
-
-	size = gtk_icon_info_get_base_size (icon_info);
-	icon = gtk_icon_info_get_filename (icon_info);
-	if (icon == NULL)
-		goto loser;
-
-	rest_pixbuf = gdk_pixbuf_new_from_file (icon, NULL);
-	gtk_icon_info_free (icon_info);
-	icon_info = NULL;
+		g_warning ("Throbber animation not found");
 
-	if (rest_pixbuf == NULL)
-	{
-		g_warning ("Could not load spinner rest icon");
-		goto loser;
+		/* If the icon naming spec compliant name wasn't found, try the old name */
+		icon_info = gtk_icon_theme_lookup_icon (icon_theme,
+							SPINNER_FALLBACK_ICON_NAME,
+						        requested_size, 0);
+		if (icon_info == NULL)
+		{
+			g_warning ("Throbber fallback animation not found either");
+			goto loser;
+	 	}
 	}
 
-	if (size > requested_size)
-	{
-		rest_pixbuf = scale_to_size (rest_pixbuf, isw, ish);
-	}
-
-	/* Load the animation */
-	icon_info = gtk_icon_theme_lookup_icon (icon_theme,
-						SPINNER_ICON_NAME,
-					        requested_size, 0);
-	if (icon_info == NULL)
-	{
-		g_warning ("Throbber animation not found");
-		goto loser;
- 	}
+	g_assert (icon_info != NULL);
 
 	size = gtk_icon_info_get_base_size (icon_info);
 	icon = gtk_icon_info_get_filename (icon_info);
@@ -358,16 +335,16 @@
  
 	images->size = icon_size;
 	images->width = images->height = requested_size;
-	images->quiescent_pixbuf = rest_pixbuf;
 
 	images->n_animation_pixbufs = n;
 	images->animation_pixbufs = g_new (GdkPixbuf *, n);
 
 	for (l = list; l != NULL; l = l->next)
 	{
+		g_assert (l->data != NULL);
 		images->animation_pixbufs[--n] = l->data;
 	}
-	/* g_assert (n == 0); */
+	g_assert (n == 0);
 
 	g_slist_free (list);
 
@@ -379,10 +356,7 @@
 	{
 		gtk_icon_info_free (icon_info);
  	}
-	if (rest_pixbuf)
-	{
-		g_object_unref (rest_pixbuf);
-	}
+
 	g_slist_foreach (list, (GFunc) g_object_unref, NULL);
 
 	/* STOP_PROFILER ("loading spinner animation") */
@@ -605,7 +579,7 @@
 
 		/* STOP_PROFILER ("gedit_spinner_load_images") */
 
-		priv->current_image = 0;
+		priv->current_image = 0; /* 'rest' icon */
 		priv->need_load = FALSE;
 	}
 
@@ -680,23 +654,15 @@
 		return FALSE;
 	}
 
-	if (priv->spinning &&
-	    images->n_animation_pixbufs > 0)
-	{
-		g_assert (priv->current_image >= 0 &&
-			  priv->current_image < images->n_animation_pixbufs);
+	/* Otherwise |images| will be NULL anyway */
+	g_assert (images->n_animation_pixbufs > 0);
 
-		pixbuf = images->animation_pixbufs[priv->current_image];
-	}
-	else
-	{
-		pixbuf = images->quiescent_pixbuf;
-	}
+	g_assert (priv->current_image >= 0 &&
+		  priv->current_image < images->n_animation_pixbufs);
 
-	if (pixbuf == NULL)
-	{
-		return FALSE;
-	}
+	pixbuf = images->animation_pixbufs[priv->current_image];
+
+	g_assert (pixbuf != NULL);
 
 	width = gdk_pixbuf_get_width (pixbuf);
 	height = gdk_pixbuf_get_height (pixbuf);
@@ -742,7 +708,8 @@
 	priv->current_image++;
 	if (priv->current_image >= priv->images->n_animation_pixbufs)
 	{
-		priv->current_image = 0;
+		/* the 0th frame is the 'rest' icon */
+		priv->current_image = MIN (1, priv->images->n_animation_pixbufs);
 	}
 
 	gtk_widget_queue_draw (GTK_WIDGET (spinner));
@@ -768,11 +735,14 @@
 			       priv->timer_task == 0 &&
 			       gedit_spinner_load_images (spinner))
 	{
-		priv->current_image = 0;
+		/* the 0th frame is the 'rest' icon */
+		priv->current_image = MIN (1, priv->images->n_animation_pixbufs);
 
-		priv->timer_task = g_timeout_add (priv->timeout,
-						  (GSourceFunc) bump_spinner_frame_cb,
-						  spinner);
+		priv->timer_task = g_timeout_add_full (G_PRIORITY_LOW,
+						       priv->timeout,
+						       (GSourceFunc) bump_spinner_frame_cb,
+						       spinner,
+						       NULL);
 	}
 }
 
@@ -800,6 +770,7 @@
 	GeditSpinnerPrivate *priv = spinner->priv;
 
 	priv->spinning = FALSE;
+	priv->current_image = 0;
 
 	if (priv->timer_task != 0)
 	{



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