/pidgin/main: 32318963e724: Move actions into the menu.

Elliott Sales de Andrade qulogic at pidgin.im
Sun Jul 8 18:28:09 EDT 2012


Changeset: 32318963e724408d1b7fa0fef1d64850b7416530
Author:	 Elliott Sales de Andrade <qulogic at pidgin.im>
Date:	 2012-06-26 00:18 -0400
Branch:	 default
URL: http://hg.pidgin.im/pidgin/main/rev/32318963e724

Description:

Move actions into the menu.

diffstat:

 pidgin/gtkconv.c    |  30 +++++++++++++++---------------
 pidgin/gtkconvwin.h |  12 +++++-------
 2 files changed, 20 insertions(+), 22 deletions(-)

diffs (108 lines):

diff --git a/pidgin/gtkconv.c b/pidgin/gtkconv.c
--- a/pidgin/gtkconv.c
+++ b/pidgin/gtkconv.c
@@ -1217,9 +1217,9 @@
 
 	purple_prpl_initiate_media(account,
 			purple_conversation_get_name(conv),
-			action == win->audio_call ? PURPLE_MEDIA_AUDIO :
-			action == win->video_call ? PURPLE_MEDIA_VIDEO :
-			action == win->audio_video_call ? PURPLE_MEDIA_AUDIO |
+			action == win->menu.audio_call ? PURPLE_MEDIA_AUDIO :
+			action == win->menu.video_call ? PURPLE_MEDIA_VIDEO :
+			action == win->menu.audio_video_call ? PURPLE_MEDIA_AUDIO |
 			PURPLE_MEDIA_VIDEO : PURPLE_MEDIA_NONE);
 }
 #endif
@@ -3362,25 +3362,25 @@
 				purple_prpl_get_media_caps(account,
 				purple_conversation_get_name(conv));
 
-		gtk_action_set_sensitive(win->audio_call,
+		gtk_action_set_sensitive(win->menu.audio_call,
 				caps & PURPLE_MEDIA_CAPS_AUDIO
 				? TRUE : FALSE);
-		gtk_action_set_sensitive(win->video_call,
+		gtk_action_set_sensitive(win->menu.video_call,
 				caps & PURPLE_MEDIA_CAPS_VIDEO
 				? TRUE : FALSE);
-		gtk_action_set_sensitive(win->audio_video_call,
+		gtk_action_set_sensitive(win->menu.audio_video_call,
 				caps & PURPLE_MEDIA_CAPS_AUDIO_VIDEO
 				? TRUE : FALSE);
 	} else if (purple_conversation_get_type(conv)
 			== PURPLE_CONV_TYPE_CHAT) {
 		/* for now, don't care about chats... */
-		gtk_action_set_sensitive(win->audio_call, FALSE);
-		gtk_action_set_sensitive(win->video_call, FALSE);
-		gtk_action_set_sensitive(win->audio_video_call, FALSE);
+		gtk_action_set_sensitive(win->menu.audio_call, FALSE);
+		gtk_action_set_sensitive(win->menu.video_call, FALSE);
+		gtk_action_set_sensitive(win->menu.audio_video_call, FALSE);
 	} else {
-		gtk_action_set_sensitive(win->audio_call, FALSE);
-		gtk_action_set_sensitive(win->video_call, FALSE);
-		gtk_action_set_sensitive(win->audio_video_call, FALSE);
+		gtk_action_set_sensitive(win->menu.audio_call, FALSE);
+		gtk_action_set_sensitive(win->menu.video_call, FALSE);
+		gtk_action_set_sensitive(win->menu.audio_video_call, FALSE);
 	}
 #endif
 }
@@ -3608,13 +3608,13 @@
 		                          "/Conversation/ConversationMenu/ViewLog");
 
 #ifdef USE_VV
-	win->audio_call =
+	win->menu.audio_call =
 		gtk_ui_manager_get_action(win->menu.ui,
 					    "/Conversation/ConversationMenu/MediaMenu/AudioCall");
-	win->video_call =
+	win->menu.video_call =
 		gtk_ui_manager_get_action(win->menu.ui,
 					    "/Conversation/ConversationMenu/MediaMenu/VideoCall");
-	win->audio_video_call =
+	win->menu.audio_video_call =
 		gtk_ui_manager_get_action(win->menu.ui,
 					    "/Conversation/ConversationMenu/MediaMenu/AudioVideoCall");
 #endif
diff --git a/pidgin/gtkconvwin.h b/pidgin/gtkconvwin.h
--- a/pidgin/gtkconvwin.h
+++ b/pidgin/gtkconvwin.h
@@ -46,10 +46,15 @@
 
 	struct
 	{
+		GtkUIManager *ui;
 		GtkWidget *menubar;
 
 		GtkAction *view_log;
 
+		GtkAction *audio_call;
+		GtkAction *video_call;
+		GtkAction *audio_video_call;
+
 		GtkAction *send_file;
 		GtkAction *get_attention;
 		GtkAction *add_pounce;
@@ -75,8 +80,6 @@
 
 		GtkWidget *typing_icon;
 
-		GtkUIManager *ui;
-
 	} menu;
 
 	/* Tab dragging stuff. */
@@ -89,11 +92,6 @@
 
 	gint drag_motion_signal;
 	gint drag_leave_signal;
-
-	/* Media menu options. */
-	GtkAction *audio_call;
-	GtkAction *video_call;
-	GtkAction *audio_video_call;
 };
 
 /*@}*/



More information about the Commits mailing list