changeset 8881:1ab2a9c17f4a

[gaim-migrate @ 9650] I'm going to thoroughly remove the prefs that we're sure about. Starting with the show_smileys one. I also tagged the commented out preferences with /* PREFSLASH04 */ to make them easily findable. And got rid of a compile warning or 5. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 06 May 2004 04:44:33 +0000
parents ec3e041dc3bd
children 25344c2d74c4
files src/gaimrc.c src/gtkconv.c src/gtkimhtml.c src/gtkimhtml.h src/gtkprefs.c src/gtkutils.c
diffstat 6 files changed, 46 insertions(+), 82 deletions(-) [+]
line wrap: on
line diff
--- a/src/gaimrc.c	Thu May 06 04:41:24 2004 +0000
+++ b/src/gaimrc.c	Thu May 06 04:44:33 2004 +0000
@@ -926,8 +926,6 @@
 					display_options & OPT_DISP_IGNORE_COLOUR);
 			gaim_prefs_set_bool("/core/conversations/im/show_login",
 					display_options & OPT_DISP_SHOW_LOGON);
-			gaim_prefs_set_bool("/gaim/gtk/conversations/show_smileys",
-					display_options & OPT_DISP_SHOW_SMILEY);
 			gaim_prefs_set_bool("/core/conversations/chat/show_join",
 					display_options & OPT_DISP_CHAT_LOGON);
 			gaim_prefs_set_int("/gaim/gtk/conversations/im/button_type",
@@ -1013,8 +1011,6 @@
 					convo_options & OPT_CONVO_SHOW_TIME);
 			gaim_prefs_set_bool("/gaim/gtk/conversations/ignore_colors",
 					convo_options & OPT_CONVO_IGNORE_COLOUR);
-			gaim_prefs_set_bool("/gaim/gtk/conversations/show_smileys",
-					convo_options & OPT_CONVO_SHOW_SMILEY);
 			gaim_prefs_set_bool("/gaim/gtk/conversations/ignore_fonts",
 					convo_options & OPT_CONVO_IGNORE_FONTS);
 			gaim_prefs_set_bool("/gaim/gtk/conversations/ignore_font_sizes",
--- a/src/gtkconv.c	Thu May 06 04:41:24 2004 +0000
+++ b/src/gtkconv.c	Thu May 06 04:44:33 2004 +0000
@@ -5637,27 +5637,6 @@
 }
 
 static void
-show_smileys_pref_cb(const char *name, GaimPrefType type, gpointer value,
-					 gpointer data)
-{
-	GList *cl;
-	GaimConversation *conv;
-	GaimGtkConversation *gtkconv;
-
-	for (cl = gaim_get_conversations(); cl != NULL; cl = cl->next) {
-		conv = (GaimConversation *)cl->data;
-
-		if (!GAIM_IS_GTK_CONVERSATION(conv))
-			continue;
-
-		gtkconv = GAIM_GTK_CONVERSATION(conv);
-
-		gtk_imhtml_show_smileys(GTK_IMHTML(gtkconv->imhtml), (gboolean)GPOINTER_TO_INT(value));
-		gtk_imhtml_show_smileys(GTK_IMHTML(gtkconv->entry), (gboolean)GPOINTER_TO_INT(value));
-	}
-}
-
-static void
 tab_side_pref_cb(const char *name, GaimPrefType type, gpointer value,
 				 gpointer data)
 {
@@ -5869,7 +5848,6 @@
 	gaim_prefs_add_bool("/gaim/gtk/conversations/send_bold", FALSE);
 	gaim_prefs_add_bool("/gaim/gtk/conversations/send_italic", FALSE);
 	gaim_prefs_add_bool("/gaim/gtk/conversations/send_underline", FALSE);
-	gaim_prefs_add_bool("/gaim/gtk/conversations/show_smileys", TRUE);
 	gaim_prefs_add_bool("/gaim/gtk/conversations/show_timestamps", TRUE);
 	gaim_prefs_add_bool("/gaim/gtk/conversations/show_urls_as_links", TRUE);
 	gaim_prefs_add_bool("/gaim/gtk/conversations/spellcheck", TRUE);
@@ -5922,8 +5900,6 @@
 								icons_on_tabs_pref_cb, NULL);
 	gaim_prefs_connect_callback("/gaim/gtk/conversations/close_on_tabs",
 								close_on_tabs_pref_cb, NULL);
-	gaim_prefs_connect_callback("/gaim/gtk/conversations/show_smileys",
-								show_smileys_pref_cb, NULL);
 	gaim_prefs_connect_callback("/gaim/gtk/conversations/show_timestamps",
 								show_timestamps_pref_cb, NULL);
 	gaim_prefs_connect_callback("/gaim/gtk/conversations/html_shortcuts",
--- a/src/gtkimhtml.c	Thu May 06 04:41:24 2004 +0000
+++ b/src/gtkimhtml.c	Thu May 06 04:44:33 2004 +0000
@@ -968,7 +968,6 @@
 	imhtml->arrow_cursor = gdk_cursor_new (GDK_LEFT_PTR);
 	imhtml->text_cursor = gdk_cursor_new (GDK_XTERM);
 
-	imhtml->show_smileys = TRUE;
 	imhtml->show_comments = TRUE;
 
 	imhtml->zoom = 1.0;
@@ -2323,7 +2322,7 @@
 			pos += tlen;
 			if(tag)
 				g_free(tag); /* This was allocated back in VALID_TAG() */
-		} else if (imhtml->show_smileys && (gtk_imhtml_is_smiley (imhtml, fonts, c, &smilelen) || gtk_imhtml_is_smiley(imhtml, NULL, c, &smilelen))) {
+		} else if (gtk_imhtml_is_smiley (imhtml, fonts, c, &smilelen) || gtk_imhtml_is_smiley(imhtml, NULL, c, &smilelen)) {
 			GtkIMHtmlFontDetail *fd;
 
 			gchar *sml = NULL;
@@ -2450,12 +2449,6 @@
 	imhtml->default_smilies = gtk_smiley_tree_new();
 }
 
-void       gtk_imhtml_show_smileys     (GtkIMHtml        *imhtml,
-					gboolean          show)
-{
-	imhtml->show_smileys = show;
-}
-
 void       gtk_imhtml_show_comments    (GtkIMHtml        *imhtml,
 					gboolean          show)
 {
@@ -3476,11 +3469,6 @@
 	GtkTextChildAnchor *anchor;
 	char *unescaped = gaim_unescape_html(smiley);
 
-	if (!imhtml->show_smileys) {
-		gtk_text_buffer_insert(imhtml->text_buffer, iter, smiley, strlen(smiley));
-		return;
-	}
-
 	anchor = gtk_text_buffer_create_child_anchor(imhtml->text_buffer, iter);
 	g_object_set_data_full(G_OBJECT(anchor), "gtkimhtml_plaintext", unescaped, g_free);
 	g_object_set_data_full(G_OBJECT(anchor), "gtkimhtml_htmltext", g_strdup(smiley), g_free);
--- a/src/gtkimhtml.h	Thu May 06 04:41:24 2004 +0000
+++ b/src/gtkimhtml.h	Thu May 06 04:44:33 2004 +0000
@@ -75,7 +75,6 @@
 	GtkSmileyTree *default_smilies;
 	char *protocol_name;
 
-	gboolean show_smileys;
 	gboolean show_comments;
 
 	gboolean html_shortcuts;
@@ -191,8 +190,6 @@
 
 void       gtk_imhtml_remove_smileys   (GtkIMHtml *imhtml);
 
-void       gtk_imhtml_show_smileys     (GtkIMHtml *imhtml, gboolean show);
-
 void       gtk_imhtml_show_comments    (GtkIMHtml *imhtml, gboolean show);
 
 void       gtk_imhtml_html_shortcuts(GtkIMHtml *imhtml, gboolean allow);
--- a/src/gtkprefs.c	Thu May 06 04:41:24 2004 +0000
+++ b/src/gtkprefs.c	Thu May 06 04:44:33 2004 +0000
@@ -91,7 +91,9 @@
 static GtkTreeIter *prefs_notebook_add_page(const char*, GdkPixbuf*,
 											GtkWidget*, GtkTreeIter*,
 											GtkTreeIter*, int);
+#if 0 /* PREFSLASH04 */
 static GtkWidget *show_color_pref(GtkWidget *, gboolean);
+#endif
 static void delete_prefs(GtkWidget *, void *);
 static void update_plugin_list(void *data);
 
@@ -755,28 +757,25 @@
 	gtk_container_set_border_width (GTK_CONTAINER (ret), 12);
 
 	vbox = gaim_gtk_make_frame (ret, _("Display"));
-	/*
-	  gaim_gtk_prefs_checkbox(_("Show graphical _smileys"),
-	  "/gaim/gtk/conversations/show_smileys", vbox);
-	*/
 	gaim_gtk_prefs_checkbox(_("Show _timestamp on messages"),
 			"/gaim/gtk/conversations/show_timestamps", vbox);
-	/*
+#if 0 /* PREFSLASH04 */
 	  gaim_gtk_prefs_checkbox(_("Show _URLs as links"),
 			"/gaim/gtk/conversations/show_urls_as_links", vbox);
-	*/
+#endif /* PREFSLASH04 */
 #ifdef USE_GTKSPELL
 	gaim_gtk_prefs_checkbox(_("_Highlight misspelled words"),
 			"/gaim/gtk/conversations/spellcheck", vbox);
 #endif
-	/*	vbox = gaim_gtk_make_frame (ret, _("Ignore"));
+#if 0 /* PREFSLASH04 */
+	vbox = gaim_gtk_make_frame (ret, _("Ignore"));
 	gaim_gtk_prefs_checkbox(_("Ignore c_olors"),
 			"/gaim/gtk/conversations/ignore_colors", vbox);
 	gaim_gtk_prefs_checkbox(_("Ignore font _faces"),
 			"/gaim/gtk/conversations/ignore_fonts", vbox);
 	gaim_gtk_prefs_checkbox(_("Ignore font si_zes"),
 			"/gaim/gtk/conversations/ignore_font_sizes", vbox);
-	*/
+#endif /* PREFSLASH04 */
 	gaim_gtk_prefs_checkbox(_("Ignore formatting on incoming messages"), NULL, vbox);
 	gtk_widget_show_all(ret);
 	return ret;
@@ -831,7 +830,7 @@
 
 	g_list_free(l);
 
-	/*	
+#if 0 /* PREFSLASH04 */
 	  vbox = gaim_gtk_make_frame (ret, _("Buddy List Toolbar"));
 	  gaim_gtk_prefs_dropdown(vbox, _("Show _buttons as:"), GAIM_PREF_INT,
 	  "/gaim/gtk/blist/button_style",
@@ -840,17 +839,17 @@
 	  _("Pictures and text"), GAIM_BUTTON_TEXT_IMAGE,
 	  _("None"), GAIM_BUTTON_NONE,
 	  NULL);
-	*/
+#endif /* PREFSLASH04 */
 
 	vbox = gaim_gtk_make_frame (ret, _("Buddy List Window"));
 	gaim_gtk_prefs_checkbox(_("_Raise window on events"),
 			"/gaim/gtk/blist/raise_on_events", vbox);
 
-	/*	
+#if 0 /* PREFSLASH04 */
 	  vbox = gaim_gtk_make_frame (ret, _("Group Display"));
 	  gaim_gtk_prefs_checkbox(_("Show _numbers in groups"),
 	  "/gaim/gtk/blist/show_group_count", vbox);
-	*/
+#endif /* PREFSLASH04 */
 
 	vbox = gaim_gtk_make_frame (ret, _("Buddy Display"));
 	gaim_gtk_prefs_checkbox(_("Show buddy _icons"),
@@ -873,7 +872,7 @@
 	GtkWidget *ret;
 	GtkWidget *vbox;
 	GtkWidget *label;
-	GtkWidget *close_checkbox, *icons_checkbox;
+	GtkWidget *close_checkbox;/*, *icons_checkbox;*/
 	GtkWidget *tabs_checkbox, *same_checkbox;
 	GtkSizeGroup *sg;
 	GList *names = NULL;
@@ -893,10 +892,10 @@
 	gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
 	gtk_size_group_add_widget(sg, label);
 
-	/*
+#if 0 /* PREFSLASH04 */
 	gaim_gtk_prefs_checkbox(_("Send _URLs as links"),
 				  "/core/conversations/send_urls_as_links", vbox);
-	*/
+#endif /* PREFSLASH04 */
 	gaim_gtk_prefs_checkbox(_("Show _formatting toolbar"),
 				  "/gaim/gtk/conversations/show_formatting_toolbar", vbox);
 
@@ -939,7 +938,7 @@
 
 	g_signal_connect(G_OBJECT(tabs_checkbox), "clicked",
 					 G_CALLBACK(gaim_gtk_toggle_sensitive), close_checkbox);
-	/*
+#if 0 /* PREFSLASH04 */
 	icons_checkbox = gaim_gtk_prefs_checkbox(_("Show status _icons on tabs"),
 									"/gaim/gtk/conversations/icons_on_tabs",
 									vbox);
@@ -950,7 +949,7 @@
 
 	g_signal_connect(G_OBJECT(tabs_checkbox), "clicked",
 					 G_CALLBACK(gaim_gtk_toggle_sensitive), icons_checkbox);
-	*/
+#endif /* PREFSLASH04 */
 
 	gtk_widget_show_all(ret);
 
@@ -960,7 +959,9 @@
 GtkWidget *im_page() {
 	GtkWidget *ret;
 	GtkWidget *vbox;
+#if 0 /* PREFSLASH04 */
 	GtkWidget *widge;
+#endif /* PREFSLASH04 */
 	GtkSizeGroup *sg;
 
 	ret = gtk_vbox_new(FALSE, 18);
@@ -968,7 +969,8 @@
 
 	sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
 
-	/*vbox = gaim_gtk_make_frame (ret, _("Window"));
+#if 0 /* PREFSLASH04 */
+	vbox = gaim_gtk_make_frame (ret, _("Window"));
 	widge = gaim_gtk_prefs_dropdown(vbox, _("Show _buttons as:"), GAIM_PREF_INT,
 			"/gaim/gtk/conversations/im/button_type",
 			_("Pictures"), GAIM_BUTTON_IMAGE,
@@ -990,17 +992,18 @@
 	gaim_gtk_prefs_checkbox(_("Hide window on _send"),
 			"/gaim/gtk/conversations/im/hide_on_send", vbox);
 	gtk_widget_show (vbox);
-	*/
+#endif /* PREFSLASH04 */
 	vbox = gaim_gtk_make_frame (ret, _("Buddy Icons"));
 	gaim_gtk_prefs_checkbox(_("Show buddy _icons"),
 			"/gaim/gtk/conversations/im/show_buddy_icons", vbox);
 	gaim_gtk_prefs_checkbox(_("Enable buddy icon a_nimation"),
 			"/gaim/gtk/conversations/im/animate_buddy_icons", vbox);
 
-	/*vbox = gaim_gtk_make_frame (ret, _("Display"));
+#if 0 /* PREFSLASH04 */
+	vbox = gaim_gtk_make_frame (ret, _("Display"));
 	gaim_gtk_prefs_checkbox(_("Show _logins in window"),
 			"/core/conversations/im/show_login", vbox);
-	*/
+#endif /* PREFSLASH04 */
 	vbox = gaim_gtk_make_frame (ret, _("Typing Notification"));
 	gaim_gtk_prefs_checkbox(_("Notify buddies that you are _typing to them"),
 			"/core/conversations/im/send_typing", vbox);
@@ -1012,14 +1015,16 @@
 GtkWidget *chat_page() {
 	GtkWidget *ret;
 	GtkWidget *vbox;
+#if 0 /* PREFSLASH04 */
 	GtkWidget *dd;
+#endif /* PREFSLASH04 */
 	GtkSizeGroup *sg;
 
 	ret = gtk_vbox_new(FALSE, 18);
 	gtk_container_set_border_width (GTK_CONTAINER (ret), 12);
 
 	sg = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
-	/*
+#if 0 /* PREFSLASH04 */
 	vbox = gaim_gtk_make_frame (ret, _("Window"));
 	dd = gaim_gtk_prefs_dropdown(vbox, _("Show _buttons as:"), GAIM_PREF_INT,
 			"/gaim/gtk/conversations/chat/button_type",
@@ -1045,14 +1050,14 @@
 			"/gaim/gtk/conversations/chat/tab_completion", vbox);
 	gaim_gtk_prefs_checkbox(_("_Old-style tab completion"),
 			"/gaim/gtk/conversations/chat/old_tab_complete", vbox);
-	*/
+#endif /* PREFSLASH04 */
 	vbox = gaim_gtk_make_frame (ret, _("Display"));
-	/*	
+#if 0 /* PREFSLASH04 */
 	  gaim_gtk_prefs_checkbox(_("_Show people joining in window"),
 			"/core/conversations/chat/show_join", vbox);
 	gaim_gtk_prefs_checkbox(_("_Show people leaving in window"),
 			"/core/conversations/chat/show_leave", vbox);
-	*/
+#endif /* PREFSLASH04 */
 	gaim_gtk_prefs_checkbox(_("Co_lorize screen names"),
 			"/gaim/gtk/conversations/chat/color_nicks", vbox);
 
@@ -1468,10 +1473,10 @@
 					 G_CALLBACK(gaim_gtk_toggle_sensitive), box);
 	gtk_widget_set_sensitive(box, syslog_enabled);
 
-/*
+#if 0 /* PREFSLASH04 */
 	gaim_gtk_prefs_checkbox(_("I_ndividual log file for each buddy's signons"),
 				   "/gaim/gtk/logging/individual_logs", vbox);
-*/
+#endif /* PREFSLASH04 */
 
 	gtk_widget_show_all(ret);
 	return ret;
@@ -1514,9 +1519,10 @@
 	sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
 
 	vbox = gaim_gtk_make_frame (ret, _("Sound Options"));
-	/*	gaim_gtk_prefs_checkbox(_("Sounds when you _log in"),
+#if 0 /* PREFSLASH04 */
+	gaim_gtk_prefs_checkbox(_("Sounds when you _log in"),
 				   "/gaim/gtk/sound/signon", vbox);
-	*/
+#endif /* PREFSLASH04 */
 	gaim_gtk_prefs_checkbox(_("Sounds when conversation has _focus"),
 				   "/gaim/gtk/sound/conv_focus", vbox);
 	gaim_gtk_prefs_checkbox(_("_Sounds while away"),
@@ -1576,6 +1582,7 @@
 	return ret;
 }
 
+#if 0 /* PREFSLASH04 */
 static void
 auto_resp_changed_cb(const char *name, GaimPrefType type, gpointer value,
 		gpointer data)
@@ -1585,6 +1592,7 @@
 
 	gtk_widget_set_sensitive(hbox, enabled);
 }
+#endif /* PREFSLASH04 */
 
 GtkWidget *away_page() {
 	GtkWidget *ret;
@@ -1602,26 +1610,26 @@
 	sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
 
 	vbox = gaim_gtk_make_frame (ret, _("Away"));
-	/*	
+#if 0 /* PREFSLASH04 */
 	  gaim_gtk_prefs_checkbox(_("_Sending messages removes away status"),
 	  "/core/conversations/away_back_on_send", vbox);
-	*/
+#endif /* PREFSLASH04 */
 	gaim_gtk_prefs_checkbox(_("_Queue new messages when away"),
 				   "/gaim/gtk/away/queue_messages", vbox);
 
 	vbox = gaim_gtk_make_frame (ret, _("Auto-response"));
-	/*	
+#if 0 /* PREFSLASH04 */
 	  hbox = gtk_hbox_new(FALSE, 0);
 	  gtk_container_add(GTK_CONTAINER(vbox), hbox);
 	  gaim_gtk_prefs_labeled_spin_button(hbox, _("Seconds before _resending:"),
 	  "/core/away/auto_response/sec_before_resend",
 	  1, 24 * 60 * 60, sg);
-	*/
+#endif /* PREFSLASH04 */
 	gaim_gtk_prefs_checkbox(_("_Send auto-response"),
 				  "/core/away/auto_response/enabled", vbox);
 	gaim_gtk_prefs_checkbox(_("_Only send auto-response when idle"),
 				  "/core/away/auto_response/idle_only", vbox);
-	/*	
+#if 0 /* PREFSLASH04 */
 	  gaim_gtk_prefs_checkbox(_("Send auto-response in _active conversations"),
 				  "/core/away/auto_response/in_active_conv", vbox);
 	if (!gaim_prefs_get_bool("/core/away/auto_response/enabled"))
@@ -1629,7 +1637,7 @@
 
 	auto_resp_pref_id = gaim_prefs_connect_callback("/core/away/auto_response/enabled",
 												  auto_resp_changed_cb, hbox);
-	*/
+#endif /* PREFSLASH04 */
 
 	vbox = gaim_gtk_make_frame (ret, _("Idle"));
 	dd = gaim_gtk_prefs_dropdown(vbox, _("Idle _time reporting:"),
@@ -2852,6 +2860,7 @@
 		gaim_prefs_set_string("/core/away/default_message", "");
 }
 
+#if 0 /* PREFSLASH04 */
 static GtkWidget *show_color_pref(GtkWidget *box, gboolean fgc)
 {
 	/* more stuff stolen from X-Chat */
@@ -2905,6 +2914,7 @@
 	gtk_widget_show(swid);
 	return swid;
 }
+#endif /* PREFSLASH04 */
 
 void apply_font_dlg(GtkWidget *w, GtkWidget *f)
 {
--- a/src/gtkutils.c	Thu May 06 04:41:24 2004 +0000
+++ b/src/gtkutils.c	Thu May 06 04:44:33 2004 +0000
@@ -68,9 +68,6 @@
 	g_return_if_fail(imhtml != NULL);
 	g_return_if_fail(GTK_IS_IMHTML(imhtml));
 
-	if (!gaim_prefs_get_bool("/gaim/gtk/conversations/show_smileys"))
-		gtk_imhtml_show_smileys(GTK_IMHTML(imhtml), FALSE);
-
 	g_signal_connect(G_OBJECT(imhtml), "url_clicked",
 					 G_CALLBACK(url_clicked_cb), NULL);