/soc/2012/tomkiewicz/gg: 7dd184afae2c: Merge url parser fix from...
Tomasz Wasilczyk
tomkiewicz at cpw.pidgin.im
Thu Jul 5 13:31:56 EDT 2012
Changeset: 7dd184afae2c695d45c83863dbeafccfd8efb700
Author: Tomasz Wasilczyk <tomkiewicz at cpw.pidgin.im>
Date: 2012-07-05 19:31 +0200
Branch: soc.2012.gg
URL: http://hg.pidgin.im/soc/2012/tomkiewicz/gg/rev/7dd184afae2c
Description:
Merge url parser fix from trunk
diffstat:
libpurple/util.c | 6 ++--
pidgin/gtkaccount.c | 57 ++++++++++++++++++++++++++--------------------------
2 files changed, 32 insertions(+), 31 deletions(-)
diffs (97 lines):
diff --git a/libpurple/util.c b/libpurple/util.c
--- a/libpurple/util.c
+++ b/libpurple/util.c
@@ -3896,9 +3896,9 @@
#define ADDR_CTRL "A-Za-z0-9.-"
#define PORT_CTRL "0-9"
-#define PAGE_CTRL "A-Za-z0-9.~_/:*!@&%%?=+^-"
-#define USER_CTRL "A-Za-z0-9.~_/*!&%%?=+^-"
-#define PASSWD_CTRL "A-Za-z0-9.~_/*!&%%?=+^-"
+#define PAGE_CTRL "A-Za-z0-9.,~_/:*!@&%%?=+^-"
+#define USER_CTRL "A-Za-z0-9.,~_/*!&%%?=+^-"
+#define PASSWD_CTRL "A-Za-z0-9.,~_/*!&%%?=+^-"
g_return_val_if_fail(url != NULL, FALSE);
diff --git a/pidgin/gtkaccount.c b/pidgin/gtkaccount.c
--- a/pidgin/gtkaccount.c
+++ b/pidgin/gtkaccount.c
@@ -307,6 +307,34 @@
}
}
+static gboolean
+username_nofocus_cb(GtkWidget *widget, GdkEventFocus *event, AccountPrefsDialog *dialog)
+{
+ GdkColor color = {0, 34952, 35466, 34181};
+ GHashTable *table = NULL;
+ const char *label = NULL;
+
+ if(PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(dialog->prpl_info, get_account_text_table)) {
+ table = dialog->prpl_info->get_account_text_table(NULL);
+ label = g_hash_table_lookup(table, "login_label");
+
+ if (*gtk_entry_get_text(GTK_ENTRY(widget)) == '\0') {
+ /* We have to avoid hitting the username_changed_cb function
+ * because it enables buttons we don't want enabled yet ;)
+ */
+ g_signal_handlers_block_by_func(widget, G_CALLBACK(username_changed_cb), dialog);
+ gtk_entry_set_text(GTK_ENTRY(widget), label);
+ /* Make sure we can hit it again */
+ g_signal_handlers_unblock_by_func(widget, G_CALLBACK(username_changed_cb), dialog);
+ gtk_widget_modify_text(widget, GTK_STATE_NORMAL, &color);
+ }
+
+ g_hash_table_destroy(table);
+ }
+
+ return FALSE;
+}
+
static void
register_button_cb(GtkWidget *checkbox, AccountPrefsDialog *dialog)
{
@@ -318,6 +346,7 @@
if (register_noscreenname) {
gtk_entry_set_text(GTK_ENTRY(dialog->username_entry), "");
+ username_nofocus_cb(dialog->username_entry, NULL, dialog);
gtk_entry_set_text(GTK_ENTRY(dialog->password_entry), "");
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->remember_pass_check), FALSE);
}
@@ -333,34 +362,6 @@
}
}
-static gboolean
-username_nofocus_cb(GtkWidget *widget, GdkEventFocus *event, AccountPrefsDialog *dialog)
-{
- GdkColor color = {0, 34952, 35466, 34181};
- GHashTable *table = NULL;
- const char *label = NULL;
-
- if(PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(dialog->prpl_info, get_account_text_table)) {
- table = dialog->prpl_info->get_account_text_table(NULL);
- label = g_hash_table_lookup(table, "login_label");
-
- if (*gtk_entry_get_text(GTK_ENTRY(widget)) == '\0') {
- /* We have to avoid hitting the username_changed_cb function
- * because it enables buttons we don't want enabled yet ;)
- */
- g_signal_handlers_block_by_func(widget, G_CALLBACK(username_changed_cb), dialog);
- gtk_entry_set_text(GTK_ENTRY(widget), label);
- /* Make sure we can hit it again */
- g_signal_handlers_unblock_by_func(widget, G_CALLBACK(username_changed_cb), dialog);
- gtk_widget_modify_text(widget, GTK_STATE_NORMAL, &color);
- }
-
- g_hash_table_destroy(table);
- }
-
- return FALSE;
-}
-
static void
icon_filesel_choose_cb(const char *filename, gpointer data)
{
More information about the Commits
mailing list