/pidgin/main: b5bc1f40fdee: Merge heads.

Elliott Sales de Andrade qulogic at pidgin.im
Sun Jan 27 05:57:50 EST 2013


Changeset: b5bc1f40fdee64e95488c69e4f829fd60bbf8dc2
Author:	 Elliott Sales de Andrade <qulogic at pidgin.im>
Date:	 2013-01-27 05:12 -0500
Branch:	 default
URL: http://hg.pidgin.im/pidgin/main/rev/b5bc1f40fdee

Description:

Merge heads.

diffstat:

 ChangeLog.API                     |   1 +
 configure.ac                      |  10 ++--
 pidgin/gtk3compat.h               |  82 ---------------------------------------
 pidgin/gtkaccount.c               |  61 ++++++++--------------------
 pidgin/gtkblist.c                 |  44 +-------------------
 pidgin/gtkconv.c                  |   7 ---
 pidgin/gtkconv.h                  |   4 -
 pidgin/gtkdebug.c                 |   9 ----
 pidgin/gtkdocklet.c               |  41 +++---------------
 pidgin/gtkimhtml.c                |   6 +-
 pidgin/gtkimhtmltoolbar.c         |   7 ---
 pidgin/gtkimhtmltoolbar.h         |   4 -
 pidgin/gtkmedia.c                 |  26 ------------
 pidgin/gtkmenutray.c              |  34 ----------------
 pidgin/gtknotify.c                |   5 --
 pidgin/gtkpluginpref.c            |   4 -
 pidgin/gtkprefs.c                 |   4 -
 pidgin/gtkrequest.c               |  13 ------
 pidgin/gtkstatusbox.c             |   2 -
 pidgin/minidialog.c               |  10 ----
 pidgin/minidialog.h               |   5 --
 pidgin/pidgin.h                   |  17 --------
 pidgin/pidgintooltip.c            |   7 ---
 pidgin/plugins/convcolors.c       |  10 ----
 pidgin/plugins/notify.c           |   4 -
 pidgin/plugins/pidginrc.c         |   8 ---
 pidgin/plugins/themeedit.c        |  14 ------
 pidgin/plugins/timestamp_format.c |   9 ----
 pidgin/plugins/xmppconsole.c      |  12 -----
 29 files changed, 39 insertions(+), 421 deletions(-)

diffs (truncated from 1073 to 300 lines):

diff --git a/ChangeLog.API b/ChangeLog.API
--- a/ChangeLog.API
+++ b/ChangeLog.API
@@ -165,6 +165,7 @@ version 3.0.0 (??/??/????):
 		* pidgin_check_if_dir
 		* PIDGIN_DIALOG
 		* pidgin_dialogs_alias_contact
+		* pidgin_mini_dialog_links_supported
 		* pidgin_set_custom_buddy_icon
 		* pidgin_setup_screenname_autocomplete_with_filter
 		* PidginBuddyList.connection_errors
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -379,7 +379,7 @@ AC_ARG_ENABLE(consoleui, [AS_HELP_STRING
 	[enable_consoleui=$enableval force_finch=$enableval], [enable_consoleui=yes force_finch=no])
 
 dnl #######################################################################
-dnl # Check for GTK+ 2.10 and other things used by the GTK UI
+dnl # Check for GTK+ 2.18 and other things used by the GTK UI
 dnl #######################################################################
 AC_ARG_ENABLE(screensaver,
 	[AS_HELP_STRING([--disable-screensaver],
@@ -439,20 +439,20 @@ Pidgin.  If you want to build only Finch
 running configure.
 ])])
 	elif test "x$with_gtk" = "x2"; then
-		PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.10.0], , [
+		PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.18.0], , [
 			AC_MSG_RESULT(no)
 			AC_MSG_ERROR([
-You must have GTK+ 2.10.0 or newer development headers installed to compile
+You must have GTK+ 2.18.0 or newer development headers installed to compile
 Pidgin.  If you want to build only Finch then specify --disable-gtkui when
 running configure.
 ])])
 	elif test "x$with_gtk" = "xauto"; then
 		PKG_CHECK_MODULES(GTK, [gtk+-3.0 >= 3.0.0], [with_gtk=3], [
 			AC_MSG_RESULT(no)
-			PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.10.0], [with_gtk=2], [
+			PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.18.0], [with_gtk=2], [
 				AC_MSG_RESULT(no)
 				AC_MSG_ERROR([
-You must have GTK+ 2.10.0 or newer development headers installed to compile
+You must have GTK+ 2.18.0 or newer development headers installed to compile
 Pidgin.  If you want to build only Finch then specify --disable-gtkui when
 running configure.
 ])])])
diff --git a/pidgin/gtk3compat.h b/pidgin/gtk3compat.h
--- a/pidgin/gtk3compat.h
+++ b/pidgin/gtk3compat.h
@@ -97,88 +97,6 @@ static inline gint gdk_window_get_height
 		GTK_WIDGET_UNSET_FLAGS(x, GTK_REALIZED); \
 } while(0)
 
-#if !GTK_CHECK_VERSION(2,18,0)
-
-#define gtk_widget_get_state GTK_WIDGET_STATE
-#define gtk_widget_is_drawable GTK_WIDGET_DRAWABLE
-#define gtk_widget_get_visible GTK_WIDGET_VISIBLE
-#define gtk_widget_has_focus GTK_WIDGET_HAS_FOCUS
-#define gtk_widget_is_sensitive GTK_WIDGET_IS_SENSITIVE
-#define gtk_widget_get_has_window(x) !GTK_WIDGET_NO_WINDOW(x)
-#define gtk_widget_set_has_window(x,y) do { \
-	if (!y) \
-		GTK_WIDGET_SET_FLAGS(x, GTK_NO_WINDOW); \
-	else \
-		GTK_WIDGET_UNSET_FLAGS(x, GTK_NO_WINDOW); \
-} while(0)
-#define gtk_widget_get_allocation(x,y) *(y) = (x)->allocation
-#define gtk_widget_set_allocation(x,y) (x)->allocation = *(y)
-#define gtk_widget_set_window(x,y) ((x)->window = (y))
-#define gtk_widget_set_can_default(w,y) do { \
-	if (y) \
-		GTK_WIDGET_SET_FLAGS((w), GTK_CAN_DEFAULT); \
-	else \
-		GTK_WIDGET_UNSET_FLAGS((w), GTK_CAN_DEFAULT); \
-} while (0)
-#define gtk_widget_set_can_focus(x,y) do {\
-	if (y) \
-		GTK_WIDGET_SET_FLAGS(x, GTK_CAN_FOCUS); \
-	else \
-		GTK_WIDGET_UNSET_FLAGS(x, GTK_CAN_FOCUS); \
-} while(0)
-#define gtk_cell_renderer_set_padding(x,y,z) do { \
-	(x)->xpad = (y); \
-	(x)->ypad = (z); \
-} while (0)
-#define gtk_cell_renderer_get_padding(x,y,z) do { \
-	*(y) = (x)->xpad; \
-	*(z) = (x)->ypad; \
-} while (0)
-#define gtk_cell_renderer_get_alignment(x,y,z) do { \
-	*(y) = (x)->xalign; \
-	*(z) = (x)->yalign; \
-} while (0)
-
-#if !GTK_CHECK_VERSION(2,16,0)
-
-#define gtk_status_icon_set_tooltip_text gtk_status_icon_set_tooltip
-
-#if !GTK_CHECK_VERSION(2,14,0)
-
-#define gtk_widget_get_window(x) (x)->window
-#define gtk_widget_set_style(x,y) (x)->style = (y)
-#define gtk_selection_data_get_data(x) (x)->data
-#define gtk_selection_data_get_length(x) (x)->length
-#define gtk_selection_data_get_format(x) (x)->format
-#define gtk_selection_data_get_target(x) (x)->target
-#define gtk_dialog_get_content_area(x) GTK_DIALOG(x)->vbox
-#define gtk_dialog_get_action_area(x) GTK_DIALOG(x)->action_area
-#define gtk_adjustment_get_page_size(x) (x)->page_size
-#define gtk_adjustment_get_lower(x) (x)->lower
-#define gtk_adjustment_get_upper(x) (x)->upper
-#define gtk_font_selection_get_size_entry(x) (x)->size_entry
-#define gtk_font_selection_get_family_list(x) (x)->family_list
-#define gtk_font_selection_dialog_get_ok_button(x) (x)->ok_button
-#define gtk_font_selection_dialog_get_cancel_button(x) (x)->cancel_button
-#define gtk_color_selection_dialog_get_color_selection(x) (x)->colorsel
-#define gtk_menu_item_get_accel_path(x) (x)->accel_path
-
-#if !GTK_CHECK_VERSION(2,12,0)
-
-#ifdef GTK_TOOLTIPS_VAR
-#define gtk_widget_set_tooltip_text(w, t) gtk_tooltips_set_tip(GTK_TOOLTIPS_VAR, (w), (t), NULL)
-#else
-#define gtk_widget_set_tooltip_text(w, t) gtk_tooltips_set_tip(tooltips, (w), (t), NULL)
-#endif
-
-#endif /* 2.12.0 */
-
-#endif /* 2.14.0 */
-
-#endif /* 2.16.0 */
-
-#endif /* 2.18.0 */
-
 #endif /* 2.20.0 */
 
 #endif /* 2.22.0 */
diff --git a/pidgin/gtkaccount.c b/pidgin/gtkaccount.c
--- a/pidgin/gtkaccount.c
+++ b/pidgin/gtkaccount.c
@@ -665,10 +665,6 @@ add_login_options(AccountPrefsDialog *di
 	/* Password */
 	dialog->password_entry = gtk_entry_new();
 	gtk_entry_set_visibility(GTK_ENTRY(dialog->password_entry), FALSE);
-#if !GTK_CHECK_VERSION(2,16,0)
-	if (gtk_entry_get_invisible_char(GTK_ENTRY(dialog->password_entry)) == '*')
-		gtk_entry_set_invisible_char(GTK_ENTRY(dialog->password_entry), PIDGIN_INVISIBLE_CHAR);
-#endif /* Less than GTK+ 2.16 */
 	dialog->password_box = add_pref_box(dialog, vbox, _("_Password:"),
 										  dialog->password_entry);
 
@@ -983,10 +979,6 @@ add_protocol_options(AccountPrefsDialog 
 				else if (purple_account_option_string_get_masked(option))
 				{
 					gtk_entry_set_visibility(GTK_ENTRY(entry), FALSE);
-#if !GTK_CHECK_VERSION(2,16,0)
-					if (gtk_entry_get_invisible_char(GTK_ENTRY(entry)) == '*')
-						gtk_entry_set_invisible_char(GTK_ENTRY(entry), PIDGIN_INVISIBLE_CHAR);
-#endif /* Less than GTK+ 2.16 */
 				}
 
 				if (str_value != NULL && str_hints)
@@ -1224,10 +1216,6 @@ add_proxy_options(AccountPrefsDialog *di
 	/* Password */
 	dialog->proxy_pass_entry = gtk_entry_new();
 	gtk_entry_set_visibility(GTK_ENTRY(dialog->proxy_pass_entry), FALSE);
-#if !GTK_CHECK_VERSION(2,16,0)
-	if (gtk_entry_get_invisible_char(GTK_ENTRY(dialog->proxy_pass_entry)) == '*')
-		gtk_entry_set_invisible_char(GTK_ENTRY(dialog->proxy_pass_entry), PIDGIN_INVISIBLE_CHAR);
-#endif /* Less than GTK+ 2.16 */
 	add_pref_box(dialog, vbox2, _("Pa_ssword:"), dialog->proxy_pass_entry);
 
 	if (dialog->account != NULL &&
@@ -2770,33 +2758,22 @@ pidgin_accounts_request_authorization(Pu
 			(purple_connection_get_display_name(gc) != NULL) ? purple_connection_get_display_name(gc) :
 			purple_account_get_username(account);
 
-	if (pidgin_mini_dialog_links_supported()) {
-		char *escaped_remote_user = g_markup_escape_text(remote_user, -1);
-		char *escaped_alias = alias != NULL ? g_markup_escape_text(alias, -1) : g_strdup("");
-		char *escaped_our_name = g_markup_escape_text(our_name, -1);
-		char *escaped_message = message != NULL ? g_markup_escape_text(message, -1) : g_strdup("");
-		buffer = g_strdup_printf(_("<a href=\"viewinfo\">%s</a>%s%s%s wants to add you (%s) to his or her buddy list%s%s"),
-					escaped_remote_user,
-					(have_valid_alias ? " ("  : ""),
-					escaped_alias,
-					(have_valid_alias ? ")"   : ""),
-					escaped_our_name,
-					(have_valid_alias ? ": " : "."),
-					escaped_message);
-		g_free(escaped_remote_user);
-		g_free(escaped_alias);
-		g_free(escaped_our_name);
-		g_free(escaped_message);
-	} else {
-		buffer = g_strdup_printf(_("%s%s%s%s wants to add you (%s) to his or her buddy list%s%s"),
-					remote_user,
-					(have_valid_alias ? " ("  : ""),
-					(have_valid_alias ? alias : ""),
-					(have_valid_alias ? ")"   : ""),
-					our_name,
-					(message != NULL ? ": " : "."),
-					(message != NULL ? message  : ""));
-	}
+	char *escaped_remote_user = g_markup_escape_text(remote_user, -1);
+	char *escaped_alias = alias != NULL ? g_markup_escape_text(alias, -1) : g_strdup("");
+	char *escaped_our_name = g_markup_escape_text(our_name, -1);
+	char *escaped_message = message != NULL ? g_markup_escape_text(message, -1) : g_strdup("");
+	buffer = g_strdup_printf(_("<a href=\"viewinfo\">%s</a>%s%s%s wants to add you (%s) to his or her buddy list%s%s"),
+				escaped_remote_user,
+				(have_valid_alias ? " ("  : ""),
+				escaped_alias,
+				(have_valid_alias ? ")"   : ""),
+				escaped_our_name,
+				(have_valid_alias ? ": " : "."),
+				escaped_message);
+	g_free(escaped_remote_user);
+	g_free(escaped_alias);
+	g_free(escaped_our_name);
+	g_free(escaped_message);
 
 	prpl_icon = pidgin_create_prpl_icon(account, PIDGIN_PRPL_ICON_SMALL);
 
@@ -2817,10 +2794,8 @@ pidgin_accounts_request_authorization(Pu
 		NULL);
 
 	dialog = PIDGIN_MINI_DIALOG(alert);
-	if (pidgin_mini_dialog_links_supported()) {
-		pidgin_mini_dialog_enable_description_markup(dialog);
-		pidgin_mini_dialog_set_link_callback(dialog, G_CALLBACK(get_user_info_cb), aa);
-	}
+	pidgin_mini_dialog_enable_description_markup(dialog);
+	pidgin_mini_dialog_set_link_callback(dialog, G_CALLBACK(get_user_info_cb), aa);
 	pidgin_mini_dialog_set_description(dialog, buffer);
 	pidgin_mini_dialog_add_non_closing_button(dialog, _("Send Instant Message"), send_im_cb, aa);
 
diff --git a/pidgin/gtkblist.c b/pidgin/gtkblist.c
--- a/pidgin/gtkblist.c
+++ b/pidgin/gtkblist.c
@@ -1110,10 +1110,6 @@ rebuild_chat_entries(PidginChatData *dat
 			if (pce->secret)
 			{
 				gtk_entry_set_visibility(GTK_ENTRY(input), FALSE);
-#if !GTK_CHECK_VERSION(2,16,0)
-				if (gtk_entry_get_invisible_char(GTK_ENTRY(input)) == '*')
-					gtk_entry_set_invisible_char(GTK_ENTRY(input), PIDGIN_INVISIBLE_CHAR);
-#endif /* Less than GTK+ 2.16 */
 			}
 			pidgin_add_widget_to_vbox(data->rq_data.vbox, pce->label, data->rq_data.sg, input, TRUE, NULL);
 			g_signal_connect(G_OBJECT(input), "changed",
@@ -5473,6 +5469,7 @@ create_account_label(PurpleAccount *acco
 	GtkWidget *hbox, *label;
 	const char *username = purple_account_get_username(account);
 	char *markup;
+	char *description;
 
 	hbox = gtk_hbox_new(FALSE, 6);
 	g_object_set_data(G_OBJECT(hbox), OBJECT_DATA_KEY_ACCOUNT, account);
@@ -5485,14 +5482,9 @@ create_account_label(PurpleAccount *acco
 	g_free(markup);
 	gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
 	g_object_set(G_OBJECT(label), "ellipsize", PANGO_ELLIPSIZE_END, NULL);
-#if GTK_CHECK_VERSION(2,12,0)
-	{ /* avoid unused variable warnings on pre-2.12 Gtk */
-		char *description =
-			purple_account_get_current_error(account)->description;
-		if (description != NULL && *description != '\0')
-			gtk_widget_set_tooltip_text(label, description);
-	}
-#endif
+	description = purple_account_get_current_error(account)->description;
+	if (description != NULL && *description != '\0')
+		gtk_widget_set_tooltip_text(label, description);
 	gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0);
 
 	return hbox;
@@ -5536,12 +5528,10 @@ static void
 update_signed_on_elsewhere_tooltip(PurpleAccount *account,
                                    const char *description)
 {
-#if GTK_CHECK_VERSION(2,12,0)
 	PidginBuddyListPrivate *priv = PIDGIN_BUDDY_LIST_GET_PRIVATE(gtkblist);
 	GtkContainer *c = GTK_CONTAINER(priv->signed_on_elsewhere->contents);
 	GtkWidget *label = find_child_widget_by_account(c, account);
 	gtk_widget_set_tooltip_text(label, description);
-#endif
 }
 
 
@@ -5667,7 +5657,6 @@ headline_style_set (GtkWidget *widget,
 {
 	PidginBuddyListPrivate *priv = PIDGIN_BUDDY_LIST_GET_PRIVATE(gtkblist);
 	GtkStyle *style;
-#if GTK_CHECK_VERSION(2,12,0)
 	GtkWidget *window;
 
 	if (priv->changing_style)



More information about the Commits mailing list