/pidgin/main: 3819525a346f: Remove also a pidginrc plugin, as it...

Tomasz Wasilczyk twasilczyk at pidgin.im
Sun Feb 2 07:53:02 EST 2014


Changeset: 3819525a346ff48652195c68ff22226247039ffb
Author:	 Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date:	 2014-02-02 13:52 +0100
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/3819525a346f

Description:

Remove also a pidginrc plugin, as it is mostly handled by conv themes, or just not supported

diffstat:

 pidgin/plugins/Makefile.am    |    4 -
 pidgin/plugins/Makefile.mingw |    1 -
 pidgin/plugins/pidginrc.c     |  699 ------------------------------------------
 3 files changed, 0 insertions(+), 704 deletions(-)

diffs (truncated from 750 to 300 lines):

diff --git a/pidgin/plugins/Makefile.am b/pidgin/plugins/Makefile.am
--- a/pidgin/plugins/Makefile.am
+++ b/pidgin/plugins/Makefile.am
@@ -39,7 +39,6 @@ history_la_LDFLAGS          = -module -a
 iconaway_la_LDFLAGS         = -module -avoid-version
 markerline_la_LDFLAGS       = -module -avoid-version
 notify_la_LDFLAGS           = -module -avoid-version
-pidginrc_la_LDFLAGS         = -module -avoid-version
 relnot_la_LDFLAGS           = -module -avoid-version
 sendbutton_la_LDFLAGS       = -module -avoid-version
 spellchk_la_LDFLAGS         = -module -avoid-version
@@ -57,7 +56,6 @@ plugin_LTLIBRARIES = \
 	iconaway.la         \
 	markerline.la       \
 	notify.la           \
-	pidginrc.la         \
 	relnot.la           \
 	sendbutton.la       \
 	spellchk.la         \
@@ -81,7 +79,6 @@ history_la_SOURCES          = history.c
 iconaway_la_SOURCES         = iconaway.c
 markerline_la_SOURCES       = markerline.c
 notify_la_SOURCES           = notify.c
-pidginrc_la_SOURCES         = pidginrc.c
 relnot_la_SOURCES           = relnot.c
 sendbutton_la_SOURCES       = sendbutton.c
 spellchk_la_SOURCES         = spellchk.c
@@ -98,7 +95,6 @@ history_la_LIBADD           = $(GTK_LIBS
 iconaway_la_LIBADD          = $(GTK_LIBS)
 markerline_la_LIBADD        = $(GTK_LIBS) $(WEBKIT_LIBS)
 notify_la_LIBADD            = $(GTK_LIBS)
-pidginrc_la_LIBADD          = $(GTK_LIBS)
 relnot_la_LIBADD            = $(GLIB_LIBS)
 sendbutton_la_LIBADD        = $(GTK_LIBS)
 spellchk_la_LIBADD          = $(GTK_LIBS)
diff --git a/pidgin/plugins/Makefile.mingw b/pidgin/plugins/Makefile.mingw
--- a/pidgin/plugins/Makefile.mingw
+++ b/pidgin/plugins/Makefile.mingw
@@ -100,7 +100,6 @@ plugins: \
 		iconaway.dll \
 		markerline.dll \
 		notify.dll \
-		pidginrc.dll \
 		relnot.dll \
 		sendbutton.dll \
 		spellchk.dll \
diff --git a/pidgin/plugins/pidginrc.c b/pidgin/plugins/pidginrc.c
deleted file mode 100644
--- a/pidgin/plugins/pidginrc.c
+++ /dev/null
@@ -1,699 +0,0 @@
-/**
- * @file pidginrc.c Pidgin GTK+ resource control plugin.
- * @ingroup pidgin
- */
-
-/* pidgin
- *
- * Pidgin is the legal property of its developers, whose names are too numerous
- * to list here.  Please refer to the COPYRIGHT file distributed with this
- * source distribution.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
- */
-
-#include "internal.h"
-#include "gtkplugin.h"
-#include "gtkprefs.h"
-#include "gtkutils.h"
-#include "util.h"
-#include "version.h"
-
-#include "gtk3compat.h"
-
-static guint pref_callback;
-
-static const gchar *color_prefs[] = {
-	"/plugins/gtk/purplerc/color/GtkIMHtml::hyperlink-color",
-	"/plugins/gtk/purplerc/color/GtkIMHtml::hyperlink-visited-color",
-	"/plugins/gtk/purplerc/color/GtkIMHtml::send-name-color",
-	"/plugins/gtk/purplerc/color/GtkIMHtml::receive-name-color",
-	"/plugins/gtk/purplerc/color/GtkIMHtml::highlight-name-color",
-	"/plugins/gtk/purplerc/color/GtkIMHtml::action-name-color",
-	"/plugins/gtk/purplerc/color/GtkIMHtml::typing-notification-color"
-};
-static const gchar *color_prefs_set[] = {
-	"/plugins/gtk/purplerc/set/color/GtkIMHtml::hyperlink-color",
-	"/plugins/gtk/purplerc/set/color/GtkIMHtml::hyperlink-visited-color",
-	"/plugins/gtk/purplerc/set/color/GtkIMHtml::send-name-color",
-	"/plugins/gtk/purplerc/set/color/GtkIMHtml::receive-name-color",
-	"/plugins/gtk/purplerc/set/color/GtkIMHtml::highlight-name-color",
-	"/plugins/gtk/purplerc/set/color/GtkIMHtml::action-name-color",
-	"/plugins/gtk/purplerc/set/color/GtkIMHtml::typing-notification-color"
-};
-static const gchar *color_names[] = {
-	N_("Hyperlink Color"),
-	N_("Visited Hyperlink Color"),
-	N_("Sent Message Name Color"),
-	N_("Received Message Name Color"),
-	N_("Highlighted Message Name Color"),
-	N_("Action Message Name Color"),
-	N_("Typing Notification Color")
-};
-static GtkWidget *color_widgets[G_N_ELEMENTS(color_prefs)];
-
-static const gchar *widget_size_prefs[] = {
-	"/plugins/gtk/purplerc/size/GtkTreeView::horizontal_separator"
-};
-static const gchar *widget_size_prefs_set[] = {
-	"/plugins/gtk/purplerc/set/size/GtkTreeView::horizontal_separator"
-};
-static const gchar *widget_size_names[] = {
-	N_("GtkTreeView Horizontal Separation")
-};
-static GtkWidget *widget_size_widgets[G_N_ELEMENTS(widget_size_prefs)];
-
-static const gchar *font_prefs[] = {
-	"/plugins/gtk/purplerc/font/*pidgin_conv_entry",
-	"/plugins/gtk/purplerc/font/*pidgin_conv_imhtml",
-	"/plugins/gtk/purplerc/font/*pidgin_request_imhtml",
-	"/plugins/gtk/purplerc/font/*pidgin_notify_imhtml",
-};
-static const gchar *font_prefs_set[] = {
-	"/plugins/gtk/purplerc/set/font/*pidgin_conv_entry",
-	"/plugins/gtk/purplerc/set/font/*pidgin_conv_imhtml",
-	"/plugins/gtk/purplerc/set/font/*pidgin_request_imhtml",
-	"/plugins/gtk/purplerc/set/font/*pidgin_notify_imhtml",
-};
-static const gchar *font_names[] = {
-	N_("Conversation Entry"),
-	N_("Conversation History"),
-	N_("Request Dialog"),
-	N_("Notify Dialog")
-};
-static GtkWidget *font_widgets[G_N_ELEMENTS(font_prefs)];
-
-/*
-static const gchar *widget_bool_prefs[] = {
-};
-static const gchar *widget_bool_prefs_set[] = {
-};
-static const gchar *widget_bool_names[] = {
-};
-static GtkWidget *widget_bool_widgets[G_N_ELEMENTS(widget_bool_prefs)];
-*/
-
-static GString *
-make_gtkrc_string(void)
-{
-	gsize i;
-	gchar *prefbase = NULL;
-	GString *style_string = g_string_new("");
-
-	if (purple_prefs_get_bool("/plugins/gtk/purplerc/set/gtk-font-name")) {
-		const gchar *pref = purple_prefs_get_string("/plugins/gtk/purplerc/gtk-font-name");
-
-		if (pref != NULL && strcmp(pref, "")) {
-			g_string_append_printf(style_string,
-			                       "gtk-font-name = \"%s\"\n",
-			                       pref);
-		}
-	}
-
-	if (purple_prefs_get_bool("/plugins/gtk/purplerc/set/gtk-key-theme-name")) {
-		const gchar *pref = purple_prefs_get_string("/plugins/gtk/purplerc/gtk-key-theme-name");
-
-		if (pref != NULL && strcmp(pref, "")) {
-			g_string_append_printf(style_string,
-			                       "gtk-key-theme-name = \"%s\"\n",
-			                       pref);
-		}
-	}
-
-	g_string_append(style_string, "style \"purplerc_style\"\n{");
-
-	if(purple_prefs_get_bool("/plugins/gtk/purplerc/set/disable-typing-notification")) {
-		g_string_append(style_string, "\tGtkIMHtml::typing-notification-enable = 0\n");
-	}
-
-	for (i = 0; i < G_N_ELEMENTS(color_prefs); i++) {
-		if (purple_prefs_get_bool(color_prefs_set[i])) {
-			const gchar *pref;
-
-			pref = purple_prefs_get_string(color_prefs[i]);
-			if (pref != NULL && strcmp(pref, "")) {
-				prefbase = g_path_get_basename(color_prefs[i]);
-				g_string_append_printf(style_string,
-				                       "\n\t%s = \"%s\"",
-				                       prefbase, pref);
-				g_free(prefbase);
-			}
-		}
-	}
-
-	for (i = 0; i < G_N_ELEMENTS(widget_size_prefs); i++) {
-		if (purple_prefs_get_bool(widget_size_prefs_set[i])) {
-			prefbase = g_path_get_basename(widget_size_prefs[i]);
-			g_string_append_printf(style_string,
-			                       "\n\t%s = %d", prefbase,
-			                       purple_prefs_get_int(widget_size_prefs[i]));
-			g_free(prefbase);
-		}
-	}
-
-	/*
-	for (i = 0; i < G_N_ELEMENTS(widget_bool_prefs); i++) {
-		if (purple_prefs_get_bool(widget_bool_prefs_set[i])) {
-			prefbase = g_path_get_basename(widget_bool_prefs[i]);
-			g_string_append_printf(style_string,
-			                       "\t%s = %d\n", prefbase,
-			                       purple_prefs_get_bool(widget_bool_prefs[i]));
-			g_free(prefbase);
-		}
-	}
-	*/
-
-	g_string_append(style_string, "\n}\nwidget_class \"*\" style \"purplerc_style\"\n");
-
-	for (i = 0; i < G_N_ELEMENTS(font_prefs); i++) {
-		if (purple_prefs_get_bool(font_prefs_set[i])) {
-			const gchar *pref;
-
-			pref = purple_prefs_get_string(font_prefs[i]);
-			if (pref != NULL && strcmp(pref, "")) {
-				prefbase = g_path_get_basename(font_prefs[i]);
-				g_string_append_printf(style_string,
-				                       "style \"%s_style\"\n{\n"
-				                       "\tfont_name = \"%s\"\n}"
-				                       "\nwidget \"%s\" "
-				                       "style \"%s_style\"\n",
-				                       prefbase, pref,
-				                       prefbase, prefbase);
-				g_free(prefbase);
-			}
-		}
-	}
-
-	return style_string;
-}
-
-static void
-purplerc_make_changes(void)
-{
-	GString *str = make_gtkrc_string();
-	GtkSettings *setting = NULL;
-
-	gtk_rc_parse_string(str->str);
-	g_string_free(str, TRUE);
-
-	setting = gtk_settings_get_default();
-	gtk_rc_reset_styles(setting);
-}
-
-static void
-purplerc_write(GtkWidget *widget, gpointer data)
-{
-	GString *str = make_gtkrc_string();
-	str = g_string_prepend(str, "# This file automatically written by the Pidgin GTK+ Theme Control plugin.\n# Any changes to this file will be overwritten by the plugin when told to\n# write the settings again.\n# The FAQ (https://developer.pidgin.im/wiki/FAQ) contains some further examples\n# of possible pidgin gtkrc settings.\n");
-	purple_util_write_data_to_file("gtkrc-2.0", str->str, -1);
-	g_string_free(str, TRUE);
-}
-
-static void
-purplerc_reread(GtkWidget *widget, gpointer data)
-{
-	gtk_rc_reparse_all();
-	/* I don't know if this is necessary but if not it shouldn't hurt. */
-	purplerc_make_changes();
-}
-
-static void
-purplerc_pref_changed_cb(const char *name, PurplePrefType type,
-                         gconstpointer value, gpointer data)
-{
-	purplerc_make_changes();
-}
-
-static void
-purplerc_color_response(GtkDialog *color_dialog, gint response, gpointer data)
-{
-	gint subscript = GPOINTER_TO_INT(data);
-
-	if (response == GTK_RESPONSE_OK) {
-		GdkColor color;
-		gchar colorstr[8];
-		GtkWidget *colorsel =
-			gtk_color_selection_dialog_get_color_selection(GTK_COLOR_SELECTION_DIALOG(color_dialog));
-



More information about the Commits mailing list