diff --git a/data/glade/subscription_request_popup_menu.glade b/data/glade/subscription_request_popup_menu.glade
new file mode 100644
index 000000000..3290d3237
--- /dev/null
+++ b/data/glade/subscription_request_popup_menu.glade
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
diff --git a/data/glade/subscription_request_window.glade b/data/glade/subscription_request_window.glade
index ae26f479e..44dbed773 100644
--- a/data/glade/subscription_request_window.glade
+++ b/data/glade/subscription_request_window.glade
@@ -2,6 +2,7 @@
+
12
Subscription Request
@@ -16,6 +17,7 @@
GDK_WINDOW_TYPE_HINT_NORMAL
GDK_GRAVITY_NORTH_WEST
True
+ False
@@ -181,81 +183,6 @@
-
-
- True
- True
- True
- GTK_RELIEF_NORMAL
- True
-
-
-
-
- True
- 0.5
- 0.5
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
- True
- False
- 2
-
-
-
- True
- gtk-justify-fill
- 4
- 0.5
- 0.5
- 0
- 0
-
-
- 0
- False
- False
-
-
-
-
-
- True
- Contact _Info
- True
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0.5
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- False
- False
-
-
-
-
-
-
-
-
-
True
@@ -332,6 +259,97 @@
+
+
+
+ True
+ True
+ GTK_RELIEF_NORMAL
+ True
+
+
+
+
+ True
+ 0.5
+ 0.5
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+
+ True
+ False
+ 2
+
+
+
+ True
+ gtk-execute
+ 4
+ 0.5
+ 0.5
+ 0
+ 0
+
+
+ 0
+ False
+ False
+
+
+
+
+
+ True
+ _Actions
+ True
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ False
+ False
+
+
+
+
+
+ True
+ GTK_ARROW_DOWN
+ GTK_SHADOW_OUT
+ 0.5
+ 0.5
+ 0
+ 0
+
+
+ 0
+ False
+ False
+
+
+
+
+
+
+
+
0
@@ -342,4 +360,5 @@
+
diff --git a/src/dialogs.py b/src/dialogs.py
index 6e79060b4..18d109cee 100644
--- a/src/dialogs.py
+++ b/src/dialogs.py
@@ -1019,6 +1019,12 @@ class SubscriptionRequestWindow:
xml.signal_autoconnect(self)
self.window.show_all()
+ def prepare_popup_menu(self):
+ xml = gtkgui_helpers.get_glade('subscription_request_popup_menu.glade')
+ menu = xml.get_widget('subscription_request_popup_menu')
+ xml.signal_autoconnect(self)
+ return menu
+
def on_close_button_clicked(self, widget):
self.window.destroy()
@@ -1029,7 +1035,7 @@ class SubscriptionRequestWindow:
if self.jid not in gajim.contacts.get_jid_list(self.account):
AddNewContactWindow(self.account, self.jid, self.user_nick)
- def on_contact_info_button_clicked(self, widget):
+ def on_contact_info_activate(self, widget):
'''ask vcard'''
if gajim.interface.instances[self.account]['infos'].has_key(self.jid):
gajim.interface.instances[self.account]['infos'][self.jid].window.present()
@@ -1043,11 +1049,22 @@ class SubscriptionRequestWindow:
gajim.interface.instances[self.account]['infos'][self.jid].xml.\
get_widget('information_notebook').remove_page(0)
+ def on_start_chat_activate(self, widget):
+ '''open chat'''
+ gajim.interface.roster.new_chat_from_jid(self.account, self.jid)
+
def on_deny_button_clicked(self, widget):
'''refuse the request'''
gajim.connections[self.account].refuse_authorization(self.jid)
self.window.destroy()
+ def on_actions_button_clicked(self, widget):
+ '''popup action menu'''
+ menu = self.prepare_popup_menu()
+ menu.show_all()
+ gtkgui_helpers.popup_emoticons_under_button(menu, widget, self.window.window)
+
+
class JoinGroupchatWindow:
def __init__(self, account, server = '', room = '', nick = '',
automatic = False):