pidgin: bfbdcc84: Remove the timestamps toggle. This can b...

qulogic at pidgin.im qulogic at pidgin.im
Mon May 28 22:20:48 EDT 2012


----------------------------------------------------------------------
Revision: bfbdcc84940b2654ff1fd9e7448091a9977a4232
Parent:   87ddfd62632fa36c2e05ca50a1f19aff2a24a559
Author:   qulogic at pidgin.im
Date:     05/28/12 18:13:56
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/bfbdcc84940b2654ff1fd9e7448091a9977a4232

Changelog: 

Remove the timestamps toggle. This can be done with themes.

Changes against parent 87ddfd62632fa36c2e05ca50a1f19aff2a24a559

  patched  pidgin/gtkconv.c
  patched  pidgin/gtkconvwin.h

-------------- next part --------------
============================================================
--- pidgin/gtkconv.c	e540985f885b76b47743fa43c1dea2e387844239
+++ pidgin/gtkconv.c	9db8aea298b727f4ad2631c5bfa143895ad5b95c
@@ -1508,13 +1508,6 @@ static void
 }
 
 static void
-menu_timestamps_cb(GtkAction *action, gpointer data)
-{
-	purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/conversations/show_timestamps",
-		gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(action)));
-}
-
-static void
 chat_do_im(PidginConversation *gtkconv, const char *who)
 {
 	PurpleConversation *conv = gtkconv->active_conv;
@@ -3168,7 +3161,6 @@ static const GtkToggleActionEntry menu_t
 	{ "EnableLogging", NULL, N_("Enable _Logging"), NULL, NULL, G_CALLBACK(menu_logging_cb), FALSE },
 	{ "EnableSounds", NULL, N_("Enable _Sounds"), NULL, NULL, G_CALLBACK(menu_sounds_cb), FALSE },
 	{ "ShowFormattingToolbars", NULL, N_("Show Formatting _Toolbars"), NULL, NULL, G_CALLBACK(menu_toolbar_cb), FALSE },
-	{ "ShowTimestamps", NULL, N_("Show Ti_mestamps"), NULL, NULL, G_CALLBACK(menu_timestamps_cb), FALSE },
 };
 
 static const char *conversation_menu =
@@ -3213,7 +3205,6 @@ static const char *conversation_menu =
 			"<menuitem action='EnableSounds'/>"
 			"<separator/>"
 			"<menuitem action='ShowFormattingToolbars'/>"
-			"<menuitem action='ShowTimestamps'/>"
 		"</menu>"
 	"</menubar>"
 "</ui>";
@@ -3702,9 +3693,6 @@ setup_menubar(PidginWindow *win)
 	win->menu.show_formatting_toolbar =
 		gtk_ui_manager_get_action(win->menu.ui,
 		                          "/Conversation/OptionsMenu/ShowFormattingToolbars");
-	win->menu.show_timestamps =
-		gtk_ui_manager_get_action(win->menu.ui,
-		                          "/Conversation/OptionsMenu/ShowTimestamps");
 
 	win->menu.tray = pidgin_menu_tray_new();
 	gtk_menu_shell_append(GTK_MENU_SHELL(win->menu.menubar),
@@ -7856,37 +7844,6 @@ static void
 }
 
 static void
-show_timestamps_pref_cb(const char *name, PurplePrefType type,
-						gconstpointer value, gpointer data)
-{
-	GList *l;
-	PurpleConversation *conv;
-	PidginConversation *gtkconv;
-	PidginWindow *win;
-
-	for (l = purple_get_conversations(); l != NULL; l = l->next)
-	{
-		conv = (PurpleConversation *)l->data;
-
-		if (!PIDGIN_IS_PIDGIN_CONVERSATION(conv))
-			continue;
-
-		gtkconv = PIDGIN_CONVERSATION(conv);
-		win     = gtkconv->win;
-
-		gtk_toggle_action_set_active(
-		        GTK_TOGGLE_ACTION(win->menu.show_timestamps),
-		        (gboolean)GPOINTER_TO_INT(value));
-
-/* TODO WEBKIT: Use WebKit version of this. */
-#if 0
-		gtk_imhtml_show_comments(GTK_IMHTML(gtkconv->imhtml),
-			(gboolean)GPOINTER_TO_INT(value));
-#endif /* if 0 */
-	}
-}
-
-static void
 show_formatting_toolbar_pref_cb(const char *name, PurplePrefType type,
 								gconstpointer value, gpointer data)
 {
@@ -8456,7 +8413,6 @@ pidgin_conversations_init(void)
 	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/custom_smileys_size", 96);
 	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/minimum_entry_lines", 2);
 
-	purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/conversations/show_timestamps", TRUE);
 	purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/conversations/show_formatting_toolbar", TRUE);
 
 	purple_prefs_add_string(PIDGIN_PREFS_ROOT "/conversations/placement", "last");
@@ -8505,8 +8461,6 @@ pidgin_conversations_init(void)
 	/* Connect callbacks. */
 	purple_prefs_connect_callback(handle, PIDGIN_PREFS_ROOT "/conversations/close_on_tabs",
 								close_on_tabs_pref_cb, NULL);
-	purple_prefs_connect_callback(handle, PIDGIN_PREFS_ROOT "/conversations/show_timestamps",
-								show_timestamps_pref_cb, NULL);
 	purple_prefs_connect_callback(handle, PIDGIN_PREFS_ROOT "/conversations/show_formatting_toolbar",
 								show_formatting_toolbar_pref_cb, NULL);
 	purple_prefs_connect_callback(handle, PIDGIN_PREFS_ROOT "/conversations/spellcheck",
@@ -9718,9 +9672,6 @@ switch_conv_cb(GtkNotebook *notebook, Gt
 	gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(win->menu.show_formatting_toolbar),
 	                             purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/show_formatting_toolbar"));
 
-	gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(win->menu.show_timestamps),
-	                             purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/show_timestamps"));
-
 	/*
 	 * We pause icons when they are not visible.  If this icon should
 	 * be animated then start it back up again.
============================================================
--- pidgin/gtkconvwin.h	57300ad4382ba49a5c21e9706ac1687163ffc376
+++ pidgin/gtkconvwin.h	9e6fae3ac6aa429f8a7d24b9198f6f1e3ebf8d4e
@@ -68,7 +68,6 @@ struct _PidginWindow
 		GtkAction *logging;
 		GtkAction *sounds;
 		GtkAction *show_formatting_toolbar;
-		GtkAction *show_timestamps;
 
 		GtkWidget *send_to;
 


More information about the Commits mailing list