[Xfce4-commits] <eatmonkey:aria2-xml-rpc> Add place for info bar (currently code commented)

Mike Massonnet noreply at xfce.org
Sat Jan 30 15:12:06 CET 2010


Updating branch refs/heads/aria2-xml-rpc
         to 1eea45eedd4faf59e41679ad692e597e4f579983 (commit)
       from 7454f8a9c041b7e0745d5db02d7f6b5780372852 (commit)

commit 1eea45eedd4faf59e41679ad692e597e4f579983
Author: Mike Massonnet <mmassonnet at xfce.org>
Date:   Sat Jan 30 14:32:13 2010 +0100

    Add place for info bar (currently code commented)

 src/eataria2.rb   |    2 +-
 src/eatmanager.rb |   14 ++++++++++++++
 src/manager.ui    |   51 ++++++++++++++++++++++++++++++++-------------------
 3 files changed, 47 insertions(+), 20 deletions(-)

diff --git a/src/eataria2.rb b/src/eataria2.rb
index 221f09c..adcc38a 100644
--- a/src/eataria2.rb
+++ b/src/eataria2.rb
@@ -196,7 +196,7 @@ class Eat::Aria2 < GLib::Object
 					:port => @port, :user => @user, :password => @password,
 					:timeout => 60})
 			result = call("aria2.getVersion")
-			raise Exception.new("Unable to get an appropriate response to our request") if result == nil
+			raise Exception.new("Unable to connect to aria2 XML-RPC server") if result == nil
 			@version = result["version"]
 			@is_connected = true
 			signal_emit("connected")
diff --git a/src/eatmanager.rb b/src/eatmanager.rb
index c7d2d54..154cdf3 100644
--- a/src/eatmanager.rb
+++ b/src/eatmanager.rb
@@ -58,6 +58,20 @@ class Eat::Manager
 		# Setup window
 		@window.signal_connect('delete-event') { action_quit }
 
+		# Setup info bar
+=begin
+		# ruby-gnome2-0.19.3 doesn't know about Gtk::InfoBar
+		# The info bar will be used at least in one case where the connection gets
+		# refused. It will provide a visible message with an action button to manually
+		# try to reconnect.
+		@infobar = InfoBar.new
+		@infobar.set_no_show_all
+		@infolabel = Label.new
+		@infobar.add(@infolabel)
+		hbox = builder["hbox-info-bar"]
+		hbox.add(@infobar)
+=end
+
 		# Setup tree view
 		cell = CellRendererText.new
 		cell.ellipsize = Pango::ELLIPSIZE_END
diff --git a/src/manager.ui b/src/manager.ui
index 029c0d1..6306847 100644
--- a/src/manager.ui
+++ b/src/manager.ui
@@ -52,8 +52,8 @@
                     <child>
                       <object class="GtkImageMenuItem" id="menuitem-add">
                         <property name="visible">True</property>
-                        <property name="use_action_appearance">True</property>
                         <property name="related_action">action-add</property>
+                        <property name="use_action_appearance">True</property>
                         <property name="use_underline">True</property>
                         <property name="use_stock">True</property>
                       </object>
@@ -61,8 +61,8 @@
                     <child>
                       <object class="GtkImageMenuItem" id="menuitem-pause">
                         <property name="visible">True</property>
-                        <property name="use_action_appearance">True</property>
                         <property name="related_action">action-pause</property>
+                        <property name="use_action_appearance">True</property>
                         <property name="use_underline">True</property>
                         <property name="use_stock">True</property>
                       </object>
@@ -80,8 +80,8 @@
                     <child>
                       <object class="GtkImageMenuItem" id="menuitem-remove">
                         <property name="visible">True</property>
-                        <property name="use_action_appearance">True</property>
                         <property name="related_action">action-remove</property>
+                        <property name="use_action_appearance">True</property>
                         <property name="use_underline">True</property>
                         <property name="use_stock">True</property>
                       </object>
@@ -94,8 +94,8 @@
                     <child>
                       <object class="GtkImageMenuItem" id="menuitem-quit">
                         <property name="visible">True</property>
-                        <property name="use_action_appearance">True</property>
                         <property name="related_action">action-quit</property>
+                        <property name="use_action_appearance">True</property>
                         <property name="accel_path"><Manager>/File/Quit</property>
                         <property name="use_underline">True</property>
                         <property name="use_stock">True</property>
@@ -116,8 +116,8 @@
                     <child>
                       <object class="GtkImageMenuItem" id="menuitem-settings">
                         <property name="visible">True</property>
-                        <property name="use_action_appearance">True</property>
                         <property name="related_action">action-settings</property>
+                        <property name="use_action_appearance">True</property>
                         <property name="use_underline">True</property>
                         <property name="use_stock">True</property>
                       </object>
@@ -137,8 +137,8 @@
                     <child>
                       <object class="GtkCheckMenuItem" id="menuitem-showmenubar">
                         <property name="visible">True</property>
-                        <property name="use_action_appearance">True</property>
                         <property name="related_action">toggleaction-showmenubar</property>
+                        <property name="use_action_appearance">True</property>
                         <property name="use_underline">True</property>
                         <property name="active">True</property>
                       </object>
@@ -146,8 +146,8 @@
                     <child>
                       <object class="GtkCheckMenuItem" id="menuitem-showtoolbar">
                         <property name="visible">True</property>
-                        <property name="use_action_appearance">True</property>
                         <property name="related_action">toggleaction-showtoolbar</property>
+                        <property name="use_action_appearance">True</property>
                         <property name="use_underline">True</property>
                         <property name="active">True</property>
                       </object>
@@ -213,8 +213,8 @@
                     <child>
                       <object class="GtkImageMenuItem" id="menuitem-about">
                         <property name="visible">True</property>
-                        <property name="use_action_appearance">True</property>
                         <property name="related_action">action-about</property>
+                        <property name="use_action_appearance">True</property>
                         <property name="use_underline">True</property>
                         <property name="use_stock">True</property>
                       </object>
@@ -235,8 +235,8 @@
             <child>
               <object class="GtkToolButton" id="toolbutton-add">
                 <property name="visible">True</property>
-                <property name="use_action_appearance">True</property>
                 <property name="related_action">action-add</property>
+                <property name="use_action_appearance">True</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
@@ -247,8 +247,8 @@
             <child>
               <object class="GtkToolButton" id="toolbutton-pause">
                 <property name="visible">True</property>
-                <property name="use_action_appearance">True</property>
                 <property name="related_action">action-pause</property>
+                <property name="use_action_appearance">True</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
@@ -259,8 +259,8 @@
             <child>
               <object class="GtkToolButton" id="toolbutton-resume">
                 <property name="visible">True</property>
-                <property name="use_action_appearance">True</property>
                 <property name="related_action">action-resume</property>
+                <property name="use_action_appearance">True</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
@@ -271,8 +271,8 @@
             <child>
               <object class="GtkToolButton" id="toolbutton-remove">
                 <property name="visible">True</property>
-                <property name="use_action_appearance">True</property>
                 <property name="related_action">action-remove</property>
+                <property name="use_action_appearance">True</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
@@ -292,8 +292,8 @@
             <child>
               <object class="GtkToolButton" id="toolbutton-settings">
                 <property name="visible">True</property>
-                <property name="use_action_appearance">True</property>
                 <property name="related_action">action-settings</property>
+                <property name="use_action_appearance">True</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
@@ -304,8 +304,8 @@
             <child>
               <object class="GtkToolButton" id="toolbutton-about">
                 <property name="visible">True</property>
-                <property name="use_action_appearance">True</property>
                 <property name="related_action">action-about</property>
+                <property name="use_action_appearance">True</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
@@ -316,8 +316,8 @@
             <child>
               <object class="GtkToolButton" id="toolbutton-quit">
                 <property name="visible">True</property>
-                <property name="use_action_appearance">True</property>
                 <property name="related_action">action-quit</property>
+                <property name="use_action_appearance">True</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
@@ -332,6 +332,19 @@
           </packing>
         </child>
         <child>
+          <object class="GtkHBox" id="hbox-info-bar">
+            <property name="visible">True</property>
+            <child>
+              <placeholder/>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
           <object class="GtkScrolledWindow" id="scrolledwindow-manager">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
@@ -361,7 +374,7 @@
             </child>
           </object>
           <packing>
-            <property name="position">2</property>
+            <property name="position">3</property>
           </packing>
         </child>
         <child>
@@ -371,7 +384,7 @@
           </object>
           <packing>
             <property name="expand">False</property>
-            <property name="position">3</property>
+            <property name="position">4</property>
           </packing>
         </child>
       </object>
@@ -731,9 +744,9 @@
     <property name="skip_pager_hint">True</property>
     <property name="transient_for">dialog-new-download</property>
     <property name="has_separator">False</property>
-    <property name="filter">filefilter-new-download</property>
-    <property name="create_folders">False</property>
     <property name="use_preview_label">False</property>
+    <property name="create_folders">False</property>
+    <property name="filter">filefilter-new-download</property>
     <property name="preview_widget_active">False</property>
     <child internal-child="vbox">
       <object class="GtkVBox" id="dialog-vbox2">



More information about the Xfce4-commits mailing list