close button for file transfer dialog as default; Ctrl+T and file transfers menuitem in roster

This commit is contained in:
Nikos Kouremenos 2005-08-03 15:59:44 +00:00
parent 7e1958b42c
commit 148db88343
3 changed files with 53 additions and 12 deletions

View file

@ -1729,3 +1729,5 @@ class FileTransfersWindow:
self.window.hide()
return True # do NOT destory window
def on_close_button_clicked(self, widget):
self.window.hide()

View file

@ -47,7 +47,7 @@
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image919">
<widget class="GtkImage" id="image1019">
<property name="visible">True</property>
<property name="stock">gtk-new</property>
<property name="icon_size">1</property>
@ -67,7 +67,7 @@
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image920">
<widget class="GtkImage" id="image1020">
<property name="visible">True</property>
<property name="stock">gtk-connect</property>
<property name="icon_size">1</property>
@ -93,7 +93,7 @@
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image921">
<widget class="GtkImage" id="image1021">
<property name="visible">True</property>
<property name="stock">gtk-add</property>
<property name="icon_size">1</property>
@ -113,7 +113,7 @@
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image922">
<widget class="GtkImage" id="image1022">
<property name="visible">True</property>
<property name="stock">gtk-find</property>
<property name="icon_size">1</property>
@ -159,7 +159,7 @@
<signal name="activate" handler="on_about_menuitem_activate" last_modification_time="Tue, 01 Mar 2005 22:56:45 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image926">
<widget class="GtkImage" id="image1023">
<property name="visible">True</property>
<property name="stock">gtk-about</property>
<property name="icon_size">1</property>
@ -187,7 +187,7 @@
<accelerator key="Q" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image927">
<widget class="GtkImage" id="image1024">
<property name="visible">True</property>
<property name="stock">gtk-quit</property>
<property name="icon_size">1</property>
@ -222,7 +222,7 @@
<accelerator key="A" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image928">
<widget class="GtkImage" id="image1025">
<property name="visible">True</property>
<property name="stock">gtk-network</property>
<property name="icon_size">1</property>
@ -235,6 +235,28 @@
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="file_transfers_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">File _Transfers</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_file_transfers_menuitem_activate" last_modification_time="Wed, 03 Aug 2005 15:44:28 GMT"/>
<accelerator key="T" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image1026">
<property name="visible">True</property>
<property name="stock">gtk-file</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="profile_avatar_menuitem">
<property name="visible">True</property>
@ -243,7 +265,7 @@
<signal name="activate" handler="on_profile_avatar_activate" last_modification_time="Thu, 09 Jun 2005 22:22:16 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image929">
<widget class="GtkImage" id="image1027">
<property name="visible">True</property>
<property name="stock">gtk-properties</property>
<property name="icon_size">1</property>
@ -271,7 +293,7 @@
<accelerator key="P" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image930">
<widget class="GtkImage" id="image1028">
<property name="visible">True</property>
<property name="stock">gtk-preferences</property>
<property name="icon_size">1</property>
@ -17269,7 +17291,6 @@ Maybe I'll refactor later</property>
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="has_focus">True</property>
<property name="label">gtk-remove</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
@ -17301,7 +17322,6 @@ Maybe I'll refactor later</property>
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="has_focus">True</property>
<property name="label">gtk-stop</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
@ -17314,6 +17334,20 @@ Maybe I'll refactor later</property>
<signal name="clicked" handler="on_stop_button_clicked" last_modification_time="Wed, 31 Aug 2005 22:31:38 GMT"/>
</widget>
</child>
<child>
<widget class="GtkButton" id="close_button">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="has_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>
<signal name="clicked" handler="on_close_button_clicked" last_modification_time="Wed, 03 Aug 2005 15:51:45 GMT"/>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>

View file

@ -1484,7 +1484,6 @@ _('If "%s" accepts this request you will know his status.') %jid).get_response()
except RuntimeError:
pass
def on_new_message_menuitem_activate(self, widget, account):
dialogs.NewMessageDialog(self.plugin, account)
@ -1497,6 +1496,12 @@ _('If "%s" accepts this request you will know his status.') %jid).get_response()
else:
self.plugin.windows['accounts'] = config.AccountsWindow(self.plugin)
def on_file_transfers_menuitem_activate(self, widget):
if self.plugin.windows['file_transfers'].window.get_property('visible'):
self.plugin.windows['file_transfers'].window.present()
else:
self.plugin.windows['file_transfers'].window.show_all()
def on_bookmarks_menuitem_activate(self, widget):
config.ManageBookmarksWindow(self.plugin)