pidgin: 3d6af529: GTK+ 2.16.0 will set the invisible chara...
markdoliner at pidgin.im
markdoliner at pidgin.im
Fri Jan 23 21:21:28 EST 2009
-----------------------------------------------------------------
Revision: 3d6af529d09954ad47f57e63c029358ed4ae5415
Ancestor: 787545b6b0d4a2fb866909777e4e12f0d0e2e16b
Author: markdoliner at pidgin.im
Date: 2009-01-24T02:19:14
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/3d6af529d09954ad47f57e63c029358ed4ae5415
Modified files:
pidgin/gtkaccount.c pidgin/gtkblist.c
pidgin/gtkgaim-compat.h pidgin/gtkpluginpref.c
pidgin/gtkprefs.c pidgin/gtkrequest.c pidgin/pidgin.h
ChangeLog:
GTK+ 2.16.0 will set the invisible character to a nice bullet instead of
an asterisk, which has been the default up until now. So we should stop
setting the invisible character ourselves in GTK+ 2.16.0 and higher. The
comment in pidgin.h is cool because it talks about stuff that hasn't
happened yet in the past tense.
-------------- next part --------------
============================================================
--- pidgin/gtkaccount.c f5cd5c9c0c86944b42d8e0b73b53132721737e14
+++ pidgin/gtkaccount.c 0a8eb5ce93c7bb6b834c6531fa7653ae8d035516
@@ -555,8 +555,10 @@ 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);
@@ -860,8 +862,10 @@ add_protocol_options(AccountPrefsDialog
if (purple_account_option_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)
@@ -1089,8 +1093,10 @@ 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 &&
============================================================
--- pidgin/gtkblist.c 4d8b2c064b2764321bd6d81b7622acaa76f5962a
+++ pidgin/gtkblist.c 8fb829682a7ec3574013e22200eb3a99fddc8f60
@@ -955,8 +955,10 @@ rebuild_joinchat_entries(PidginJoinChatD
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(GTK_BOX(data->entries_box), pce->label, data->sg, input, TRUE, NULL);
g_signal_connect(G_OBJECT(input), "changed",
@@ -6826,8 +6828,10 @@ rebuild_addchat_entries(PidginAddChatDat
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(GTK_BOX(data->entries_box), pce->label, data->sg, input, TRUE, NULL);
g_signal_connect(G_OBJECT(input), "changed",
============================================================
--- pidgin/gtkgaim-compat.h 8d6be75b0184ff5a467a767748cfbd2c252168b1
+++ pidgin/gtkgaim-compat.h 8bf62fdb7e4aa9d706908d719fa89c1e5fdd29d9
@@ -297,7 +297,9 @@
#define GAIM_HIG_BORDER PIDGIN_HIG_BORDER
#define GAIM_HIG_BOX_SPACE PIDGIN_HIG_BOX_SPACE
#define GAIM_HIG_CAT_SPACE PIDGIN_HIG_CAT_SPACE
+#if !GTK_CHECK_VERSION(2,16,0)
#define GAIM_INVISIBLE_CHAR PIDGIN_INVISIBLE_CHAR
+#endif /* Less than GTK+ 2.16 */
#define GAIM_IS_GTK_CONVERSATION PIDGIN_IS_PIDGIN_CONVERSATION
#define GAIM_IS_GTK_PLUGIN PIDGIN_IS_PIDGIN_PLUGIN
#define gaim_new_check_item pidgin_new_check_item
============================================================
--- pidgin/gtkpluginpref.c dd7615aa76732bb4e1b951029d9bc6c94082e9ed
+++ pidgin/gtkpluginpref.c c06b032b81554a425918c9da7cb3836096b2c841
@@ -101,8 +101,10 @@ make_string_pref(GtkWidget *parent, Purp
if (purple_plugin_pref_get_masked(pref))
{
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 */
}
g_signal_connect(G_OBJECT(entry), "changed",
G_CALLBACK(entry_cb),
============================================================
--- pidgin/gtkprefs.c a83069e6a0019e2f44bec6932a7c79aaada767e5
+++ pidgin/gtkprefs.c b27d0c6926a626ec324e79c95bb565bde83a8023
@@ -1412,8 +1412,10 @@ network_page(void)
gtk_label_set_mnemonic_widget(GTK_LABEL(label), entry);
gtk_table_attach(GTK_TABLE(table), entry, 3, 4, 1, 2, GTK_FILL , 0, 0, 0);
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 */
g_signal_connect(G_OBJECT(entry), "changed",
G_CALLBACK(proxy_print_option), (void *)PROXYPASS);
============================================================
--- pidgin/gtkrequest.c d819c891448975f13a63e6658b70a2316e493359
+++ pidgin/gtkrequest.c 01d318e1c8a23c63b4706b1d22a282bb2507b027
@@ -430,8 +430,10 @@ pidgin_request_input(const char *title,
if (masked)
{
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 */
}
}
gtk_widget_show_all(vbox);
@@ -791,8 +793,10 @@ create_string_field(PurpleRequestField *
if (purple_request_field_string_is_masked(field))
{
gtk_entry_set_visibility(GTK_ENTRY(widget), FALSE);
+#if !GTK_CHECK_VERSION(2,16,0)
if (gtk_entry_get_invisible_char(GTK_ENTRY(widget)) == '*')
gtk_entry_set_invisible_char(GTK_ENTRY(widget), PIDGIN_INVISIBLE_CHAR);
+#endif /* Less than GTK+ 2.16 */
}
gtk_editable_set_editable(GTK_EDITABLE(widget),
============================================================
--- pidgin/pidgin.h 8ee30d5d74d894e22fa2759aedd923ac1460082f
+++ pidgin/pidgin.h 67bc04cd7f5aff96b29591c268b0961e17165ee2
@@ -91,11 +91,22 @@
#define PIDGIN_HIG_BORDER 12
#define PIDGIN_HIG_BOX_SPACE 6
+#if !GTK_CHECK_VERSION(2,16,0)
/*
- * See GNOME bug #307304 for some discussion about the invisible
- * character. 0x25cf is a good choice, too.
+ * Older version of GNOME defaulted to using an asterisk as the invisible
+ * character. But this is ugly and we want to use something nicer.
+ *
+ * The default invisible character was changed in Gnome revision 21446
+ * (GTK+ 2.16) from an asterisk to the first available character out of
+ * 0x25cf, 0x2022, 0x2731, 0x273a. See GNOME bugs 83935 and 307304 for
+ * discussion leading up to the change.
+ *
+ * Here's the change:
+ * http://svn.gnome.org/viewvc/gtk%2B?view=revision&revision=21446
+ *
*/
-#define PIDGIN_INVISIBLE_CHAR (gunichar)0x2022
+#define PIDGIN_INVISIBLE_CHAR (gunichar)0x25cf
+#endif /* Less than GTK+ 2.16 */
#endif /* _PIDGIN_H_ */
More information about the Commits
mailing list