Mercurial > pidgin.yaz
changeset 28438:80265d67fc7e
merge of '92e101e3698042e7600729bc09dec9e28f81de8f'
and '930d76b5c3f7e4eacec86cd7b8153fc8299a5bb3'
author | Sulabh Mahajan <sulabh@soc.pidgin.im> |
---|---|
date | Mon, 24 Aug 2009 20:43:09 +0000 |
parents | 30497d814cb9 (diff) 0400ef272c46 (current diff) |
children | e61b10db0044 |
files | |
diffstat | 6 files changed, 76 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Aug 24 20:31:02 2009 +0000 +++ b/ChangeLog Mon Aug 24 20:43:09 2009 +0000 @@ -5,6 +5,7 @@ * Fix --disable-avahi to actually disable it in configure, as opposed to just making the warning non-fatal. * Sending custom smileys in MSN chats is now supported. + * Fix using GNOME proxy settings properly. XMPP: * Prompt the user before cancelling a presence subscription.
--- a/libpurple/dbus-analyze-functions.py Mon Aug 24 20:31:02 2009 +0000 +++ b/libpurple/dbus-analyze-functions.py Mon Aug 24 20:43:09 2009 +0000 @@ -181,15 +181,20 @@ def processoutput(self, type, name): + const = False + unsigned = False # the "void" type is simple ... if type == ["void"]: return self.outputvoid(type, name) - const = False if type[0] == "const": type = type[1:] const = True + if type[0] == "unsigned": + type = type[1:] + unsigned = True + # a string if type == ["char", pointer] or type == ["gchar", pointer]: return self.outputstring(type, name, const) @@ -197,7 +202,7 @@ # simple types (ints, booleans, enums, ...) if (len(type) == 1) and \ ((type[0] in simpletypes) or (type[0].startswith("Purple"))): - return self.outputsimple(type, name) + return self.outputsimple(type, name, unsigned) # pointers ... if (len(type) == 2) and (type[1] == pointer): @@ -303,10 +308,13 @@ # self.returncode.append("NULLIFY(%s);" % name) self.returncode.append("return %s;" % name); - def outputsimple(self, type, name): + def outputsimple(self, type, name, us): self.functiontype = type[0] self.decls.append("%s %s = 0;" % (type[0], name)) - self.outputparams.append(("G_TYPE_INT", name)) + if us: + self.outputparams.append(("G_TYPE_UINT", name)) + else: + self.outputparams.append(("G_TYPE_INT", name)) self.returncode.append("return %s;" % name); # we could add "const" to the return type but this would probably @@ -455,11 +463,16 @@ if not const: self.ccodeout.append("\tg_free(%s);" % name) - def outputsimple(self, type, name): - self.cdecls.append("\tdbus_int32_t %s;" % name) + def outputsimple(self, type, name, us): + if us: + self.cdecls.append("\tdbus_uint32_t %s;" % name) + self.cparamsout.append(("UINT32", name)) + self.addouttype("u", name) + else: + self.cdecls.append("\tdbus_int32_t %s;" % name) + self.cparamsout.append(("INT32", name)) + self.addouttype("i", name) self.ccode.append("\t%s = %s;" % (name, self.call)) - self.cparamsout.append(("INT32", name)) - self.addouttype("i", name) def outputpurplestructure(self, type, name): self.cdecls.append("\tdbus_int32_t %s;" % name)
--- a/libpurple/protocols/msn/slpcall.c Mon Aug 24 20:31:02 2009 +0000 +++ b/libpurple/protocols/msn/slpcall.c Mon Aug 24 20:43:09 2009 +0000 @@ -205,7 +205,7 @@ if (slpmsg->session_id == 64) { /* This is for handwritten messages (Ink) */ - GError *error; + GError *error = NULL; gsize bytes_read, bytes_written; body_str = g_convert((const gchar *)body, body_len / 2, @@ -232,7 +232,7 @@ g_free(body_str); body_str = g_convert((const gchar *)body, body_len / 2, - "UTF-8", "UTF16-LE", + "UTF-8", "UTF-16LE", &bytes_read, &bytes_written, &error); if (!body_str) {
--- a/libpurple/proxy.c Mon Aug 24 20:31:02 2009 +0000 +++ b/libpurple/proxy.c Mon Aug 24 20:43:09 2009 +0000 @@ -245,7 +245,7 @@ return &info; } - if (purple_strequal(tmp, "manual\n")) { + if (!purple_strequal(tmp, "manual\n")) { /* Unknown setting. Fallback to using our global proxy settings. */ g_free(tmp); return purple_global_proxy_get_info();
--- a/pidgin/gtkdialogs.c Mon Aug 24 20:31:02 2009 +0000 +++ b/pidgin/gtkdialogs.c Mon Aug 24 20:43:09 2009 +0000 @@ -478,7 +478,7 @@ " <A HREF=\"http://pidgin.im/pipermail/support/\">publicly" " archived!</A> Furthermore, we do <I><B>not</B></I> support" " MXit, Facebook, Skype, or any other third-party plugins on" - " this list.<BR/><BR/>")); + " this list.)<BR/><BR/>")); g_string_append_printf(str, _("<FONT SIZE=\"4\">IRC Channel:</FONT> " "#pidgin on irc.freenode.net<BR><BR>")); g_string_append_printf(str, _("<FONT SIZE=\"4\">XMPP MUC:</FONT> "
--- a/pidgin/gtknotify.c Mon Aug 24 20:31:02 2009 +0000 +++ b/pidgin/gtknotify.c Mon Aug 24 20:43:09 2009 +0000 @@ -211,25 +211,53 @@ static void pounce_response_dismiss() { + GtkTreeModel *model = GTK_TREE_MODEL(pounce_dialog->treemodel); GtkTreeSelection *selection; GtkTreeIter iter; + GtkTreeIter new_selection; GList *list = NULL; + gboolean found_selection = FALSE; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(pounce_dialog->treeview)); gtk_tree_selection_selected_foreach(selection, delete_foreach, pounce_dialog); gtk_tree_selection_selected_foreach(selection, append_to_list, &list); + g_return_if_fail(list != NULL); + + if (list->next == NULL) { + gtk_tree_model_get_iter(model, &new_selection, list->data); + if (gtk_tree_model_iter_next(model, &new_selection)) + found_selection = TRUE; + else { + /* This is the last thing in the list */ + GtkTreePath *path; + + /* Because gtk_tree_model_iter_prev doesn't exist... */ + gtk_tree_model_get_iter(model, &new_selection, list->data); + path = gtk_tree_model_get_path(model, &new_selection); + if (gtk_tree_path_prev(path)) { + gtk_tree_model_get_iter(model, &new_selection, path); + found_selection = TRUE; + } + + gtk_tree_path_free(path); + } + } + while (list) { - GtkTreeIter iter; - if (gtk_tree_model_get_iter(GTK_TREE_MODEL(pounce_dialog->treemodel), &iter, - list->data)) { + if (gtk_tree_model_get_iter(model, &iter, list->data)) { gtk_tree_store_remove(GTK_TREE_STORE(pounce_dialog->treemodel), &iter); } gtk_tree_path_free(list->data); list = g_list_delete_link(list, list); } - if (!gtk_tree_model_get_iter_first(GTK_TREE_MODEL(pounce_dialog->treemodel), &iter)) + if (gtk_tree_model_get_iter_first(model, &iter)) { + if (found_selection) + gtk_tree_selection_select_iter(selection, &new_selection); + else + gtk_tree_selection_select_iter(selection, &iter); + } else pounce_response_close(pounce_dialog); } @@ -240,7 +268,7 @@ selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(pounce_dialog->treeview)); gtk_tree_selection_selected_foreach(selection, open_im_foreach, pounce_dialog); - + pounce_response_dismiss(); } @@ -1400,6 +1428,7 @@ GdkPixbuf *icon; GtkTreeIter iter; PidginNotifyPounceData *pounce_data; + gboolean first = (pounce_dialog == NULL); if (pounce_dialog == NULL) pounce_dialog = pidgin_create_notification_dialog(PIDGIN_NOTIFY_POUNCE); @@ -1423,6 +1452,12 @@ PIDGIN_POUNCE_DATA, pounce_data, -1); + if (first) { + GtkTreeSelection *selection = + gtk_tree_view_get_selection(GTK_TREE_VIEW(pounce_dialog->treeview)); + gtk_tree_selection_select_iter(selection, &iter); + } + if (icon) g_object_unref(icon); @@ -1461,9 +1496,7 @@ G_TYPE_STRING, G_TYPE_POINTER); } - dialog = gtk_dialog_new_with_buttons(NULL, NULL, 0, - GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, - NULL); + dialog = gtk_dialog_new(); /* Setup the dialog */ gtk_container_set_border_width(GTK_CONTAINER(dialog), PIDGIN_HIG_BOX_SPACE); @@ -1537,17 +1570,17 @@ _("IM"), GTK_RESPONSE_YES); gtk_widget_set_sensitive(button, FALSE); spec_dialog->open_button = button; - + + button = gtk_dialog_add_button(GTK_DIALOG(dialog), + PIDGIN_STOCK_MODIFY, GTK_RESPONSE_APPLY); + gtk_widget_set_sensitive(button, FALSE); + spec_dialog->edit_button = button; + button = gtk_dialog_add_button(GTK_DIALOG(dialog), _("Dismiss"), GTK_RESPONSE_NO); gtk_widget_set_sensitive(button, FALSE); spec_dialog->dismiss_button = button; - button = gtk_dialog_add_button(GTK_DIALOG(dialog), - PIDGIN_STOCK_EDIT, GTK_RESPONSE_APPLY); - gtk_widget_set_sensitive(button, FALSE); - spec_dialog->edit_button = button; - g_signal_connect(G_OBJECT(dialog), "response", G_CALLBACK(pounce_response_cb), spec_dialog); @@ -1598,6 +1631,9 @@ G_CALLBACK(pounce_response_open_ims), NULL); } + button = gtk_dialog_add_button(GTK_DIALOG(dialog), + GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE); + gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); gtk_misc_set_alignment(GTK_MISC(label), 0, 0); gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);