# HG changeset patch # User Sadrul Habib Chowdhury # Date 1188690622 0 # Node ID 57d350900136c3fbb49a807f650dc52940f264bd # Parent 4691b5f80ac8808521438243a96b000eef1952a3 Tooltips can be for the buddylist or for conversation windows. A more appropriate fix for #2723. diff -r 4691b5f80ac8 -r 57d350900136 Doxyfile.in --- a/Doxyfile.in Sat Sep 01 23:09:41 2007 +0000 +++ b/Doxyfile.in Sat Sep 01 23:50:22 2007 +0000 @@ -293,7 +293,7 @@ # alphabetically by member name. If set to NO the members will appear in # declaration order. -SORT_MEMBER_DOCS = YES +SORT_MEMBER_DOCS = NO # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the # brief documentation of file, namespace and class members alphabetically @@ -310,7 +310,7 @@ # Note: This option applies only to the class list, not to the # alphabetical list. -SORT_BY_SCOPE_NAME = YES +SORT_BY_SCOPE_NAME = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo @@ -756,7 +756,7 @@ # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. -PDF_HYPERLINKS = NO +PDF_HYPERLINKS = YES # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a @@ -1039,7 +1039,7 @@ # option is superceded by the HAVE_DOT option below. This is only a fallback. It is # recommended to install and use dot, since it yields more powerful graphs. -CLASS_DIAGRAMS = YES +CLASS_DIAGRAMS = NO # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented diff -r 4691b5f80ac8 -r 57d350900136 autogen.sh --- a/autogen.sh Sat Sep 01 23:09:41 2007 +0000 +++ b/autogen.sh Sat Sep 01 23:50:22 2007 +0000 @@ -57,13 +57,21 @@ fi done +echo "stage 1" libtoolize -c -f --automake +echo "stage 2" glib-gettextize --force --copy +echo "stage 3" intltoolize --force --copy +echo "stage 4" aclocal $ACLOCAL_FLAGS || exit; +echo "stage 5" autoheader || exit; +echo "stage 6" automake --add-missing --copy; +echo "stage 7" autoconf || exit; +echo "stage 8" automake || exit; echo; diff -r 4691b5f80ac8 -r 57d350900136 doc/TracHeader.html --- a/doc/TracHeader.html Sat Sep 01 23:09:41 2007 +0000 +++ b/doc/TracHeader.html Sat Sep 01 23:50:22 2007 +0000 @@ -1,2 +1,2 @@ + - diff -r 4691b5f80ac8 -r 57d350900136 finch/finch.c --- a/finch/finch.c Sat Sep 01 23:09:41 2007 +0000 +++ b/finch/finch.c Sat Sep 01 23:50:22 2007 +0000 @@ -171,12 +171,20 @@ return closure->result; } +static gboolean +gnt_input_remove(guint tag) +{ + if ((gint)tag <= 0) + return FALSE; + return g_source_remove(tag); +} + static PurpleEventLoopUiOps eventloop_ops = { g_timeout_add, g_source_remove, gnt_input_add, - g_source_remove, + gnt_input_remove, NULL, /* input_get_error */ #if GLIB_CHECK_VERSION(2,14,0) g_timeout_add_seconds, diff -r 4691b5f80ac8 -r 57d350900136 finch/libgnt/gntmenu.c --- a/finch/libgnt/gntmenu.c Sat Sep 01 23:09:41 2007 +0000 +++ b/finch/libgnt/gntmenu.c Sat Sep 01 23:50:22 2007 +0000 @@ -286,6 +286,7 @@ sub = sub->submenu; } gnt_widget_draw(widget); + gnt_widget_activate(GNT_WIDGET(menu)); return TRUE; } } else { diff -r 4691b5f80ac8 -r 57d350900136 finch/libgnt/test/Makefile --- a/finch/libgnt/test/Makefile Sat Sep 01 23:09:41 2007 +0000 +++ b/finch/libgnt/test/Makefile Sat Sep 01 23:50:22 2007 +0000 @@ -1,5 +1,5 @@ CC=gcc -CFLAGS=`pkg-config --cflags gobject-2.0 gmodule-2.0` -g -I../ -DSTANDALONE +CFLAGS=`pkg-config --cflags gobject-2.0 gmodule-2.0` -g -I../ -DSTANDALONE -I/usr/include/ncursesw/ LDFLAGS=`pkg-config --libs gobject-2.0 gmodule-2.0 gnt` -pg EXAMPLES=combo focus tv multiwin keys menu parse diff -r 4691b5f80ac8 -r 57d350900136 finch/libgnt/test/file.c --- a/finch/libgnt/test/file.c Sat Sep 01 23:09:41 2007 +0000 +++ b/finch/libgnt/test/file.c Sat Sep 01 23:50:22 2007 +0000 @@ -14,7 +14,7 @@ gnt_init(); GntWidget *w = gnt_file_sel_new(); - gnt_file_sel_set_current_location(GNT_FILE_SEL(w), "/home/"); + gnt_file_sel_set_current_location(GNT_FILE_SEL(w), "asd/home/asdasd/qweqweasd"); gnt_file_sel_set_dirs_only(GNT_FILE_SEL(w), TRUE); gnt_file_sel_set_multi_select(GNT_FILE_SEL(w), TRUE); gnt_widget_show(w); diff -r 4691b5f80ac8 -r 57d350900136 finch/libgnt/test/menu.c --- a/finch/libgnt/test/menu.c Sat Sep 01 23:09:41 2007 +0000 +++ b/finch/libgnt/test/menu.c Sat Sep 01 23:50:22 2007 +0000 @@ -24,9 +24,6 @@ gnt_menu_add_item(GNT_MENU(menu), GNT_MENU_ITEM(item)); - item = gnt_menuitem_new("Edit"); - gnt_menu_add_item(GNT_MENU(menu), GNT_MENU_ITEM(item)); - item = gnt_menuitem_new("Help"); gnt_menu_add_item(GNT_MENU(menu), GNT_MENU_ITEM(item)); @@ -53,6 +50,14 @@ gnt_menu_add_item(GNT_MENU(sub), GNT_MENU_ITEM(item)); gnt_menuitem_set_callback(GNT_MENU_ITEM(item), dothis, NULL); + item = gnt_menuitem_new("asd"); + gnt_menuitem_set_trigger(GNT_MENU_ITEM(item), 'k'); + gnt_menu_add_item(GNT_MENU(sub), GNT_MENU_ITEM(item)); + gnt_menuitem_set_callback(GNT_MENU_ITEM(item), dothis, NULL); + + item = gnt_menuitem_new("Edit"); + gnt_menu_add_item(GNT_MENU(menu), GNT_MENU_ITEM(item)); + gnt_screen_menu_show(menu); GntWidget *win = gnt_window_new(); diff -r 4691b5f80ac8 -r 57d350900136 finch/libgnt/test/tv.c --- a/finch/libgnt/test/tv.c Sat Sep 01 23:09:41 2007 +0000 +++ b/finch/libgnt/test/tv.c Sat Sep 01 23:50:22 2007 +0000 @@ -7,6 +7,28 @@ #include "gnttextview.h" #include "gntutils.h" +static test() +{ + GntWidget *win; + GntWidget *tv; + GntWidget *entry; + + win = gnt_window_box_new(FALSE, TRUE); + tv = gnt_text_view_new(); + gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(tv), "line1\nline2\nline3\n", GNT_TEXT_FLAG_NORMAL); + gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(tv),"line4\n\nline5\n\nline6\n\n", +GNT_TEXT_FLAG_NORMAL); + + gnt_text_view_scroll(GNT_TEXT_VIEW(tv), 10); + gnt_box_add_widget(GNT_BOX(win), tv); + + entry = gnt_entry_new(""); + gnt_text_view_attach_scroll_widget(GNT_TEXT_VIEW(tv),entry); + gnt_box_add_widget(GNT_BOX(win), entry); + + gnt_widget_show(win); +} + static gboolean key_pressed(GntWidget *w, const char *key, GntWidget *view) { @@ -118,7 +140,38 @@ gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(view), "plugins: ", GNT_TEXT_FLAG_BOLD); gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(view), "this is the 4th line\n", GNT_TEXT_FLAG_NORMAL); - gnt_util_parse_xhtml_to_textview("

Ohoy hoy!!

I think this is going to

WORK!!! check this out!!

", GNT_TEXT_VIEW(view)); + gnt_util_parse_xhtml_to_textview("

Ohoy hoy!!

I think this is going to

WORK!!! check this out!!

", GNT_TEXT_VIEW(view)); + + gnt_util_parse_xhtml_to_textview("\ + \ + \ + Conversation with user@gmail.com at Sun Jun 3 14:58:54 2007 on aluink@gmail.com/Gaim (jabber)\ + \ + \ +

Conversation with user@gmail.com at Sun Jun 3 14:58:54 2007 on aluink@gmail.com/Gaim (jabber)

\ + \ + (14:58:54)\ + user@gmail.com:\ + \ +\ +\ +\ + \ + Some message from user\ + \ +
\ +\ +\ +\ + \ + (15:03:19) \ + aluink:\ + Some more stuff from me
\ + \ +", GNT_TEXT_VIEW(view)); + + +test(); #ifdef STANDALONE gnt_main(); diff -r 4691b5f80ac8 -r 57d350900136 libpurple/Makefile.am --- a/libpurple/Makefile.am Sat Sep 01 23:09:41 2007 +0000 +++ b/libpurple/Makefile.am Sat Sep 01 23:50:22 2007 +0000 @@ -1,4 +1,5 @@ EXTRA_DIST = \ + example/ \ dbus-analyze-functions.py \ dbus-analyze-types.py \ purple-notifications-example \ @@ -29,7 +30,7 @@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = purple.pc -SUBDIRS = $(GCONF_DIR) plugins protocols tests . example +SUBDIRS = plugins protocols purple_coresources = \ account.c \ diff -r 4691b5f80ac8 -r 57d350900136 libpurple/certificate.h --- a/libpurple/certificate.h Sat Sep 01 23:09:41 2007 +0000 +++ b/libpurple/certificate.h Sat Sep 01 23:50:22 2007 +0000 @@ -771,6 +771,16 @@ void purple_certificate_display_x509(PurpleCertificate *crt); +/** + * Initialize the certificate subsystem. + */ +void purple_certificates_init(void); + +/** + * Uninitialize the certificate subsystem. + */ +void purple_certificates_uninit(void); + #ifdef __cplusplus } diff -r 4691b5f80ac8 -r 57d350900136 libpurple/conversation.h --- a/libpurple/conversation.h Sat Sep 01 23:09:41 2007 +0000 +++ b/libpurple/conversation.h Sat Sep 01 23:50:22 2007 +0000 @@ -667,7 +667,7 @@ * * @param conv The conversation * - * @return A GList of PurpleConvMessage's. The must not modify the list or the data within. + * @return A GList of PurpleConvMessage's. Caller must not modify the list or the data within. * The list contains the newest message at the beginning, and the oldest message at * the end. */ diff -r 4691b5f80ac8 -r 57d350900136 libpurple/eventloop.c --- a/libpurple/eventloop.c Sat Sep 01 23:09:41 2007 +0000 +++ b/libpurple/eventloop.c Sat Sep 01 23:50:22 2007 +0000 @@ -67,6 +67,8 @@ { PurpleEventLoopUiOps *ops = purple_eventloop_get_ui_ops(); + g_printerr("XXX: removing %d\n", tag); + return ops->input_remove(tag); } diff -r 4691b5f80ac8 -r 57d350900136 libpurple/example/nullclient.c --- a/libpurple/example/nullclient.c Sat Sep 01 23:09:41 2007 +0000 +++ b/libpurple/example/nullclient.c Sat Sep 01 23:50:22 2007 +0000 @@ -21,9 +21,6 @@ * */ -/* XXX: we probably shouldn't include internal.h in examples */ -#include "internal.h" - #include "account.h" #include "conversation.h" #include "core.h" diff -r 4691b5f80ac8 -r 57d350900136 libpurple/ft.c --- a/libpurple/ft.c Sat Sep 01 23:09:41 2007 +0000 +++ b/libpurple/ft.c Sat Sep 01 23:50:22 2007 +0000 @@ -20,7 +20,6 @@ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #include "internal.h" #include "dbus-maybe.h" diff -r 4691b5f80ac8 -r 57d350900136 libpurple/plugins/autoaccept.c --- a/libpurple/plugins/autoaccept.c Sat Sep 01 23:09:41 2007 +0000 +++ b/libpurple/plugins/autoaccept.c Sat Sep 01 23:50:22 2007 +0000 @@ -106,12 +106,12 @@ node = node->parent; g_return_if_fail(PURPLE_BLIST_NODE_IS_CONTACT(node)); - pref = purple_prefs_get_string(PREF_PATH); switch (purple_blist_node_get_int(node, "autoaccept")) { case FT_ASK: break; case FT_ACCEPT: + pref = purple_prefs_get_string(PREF_PATH); if (ensure_path_exists(pref)) { dirname = g_build_filename(pref, xfer->who, NULL); diff -r 4691b5f80ac8 -r 57d350900136 libpurple/plugins/dbus-example.c --- a/libpurple/plugins/dbus-example.c Sat Sep 01 23:09:41 2007 +0000 +++ b/libpurple/plugins/dbus-example.c Sat Sep 01 23:50:22 2007 +0000 @@ -49,6 +49,7 @@ #define DBUS_API_SUBJECT_TO_CHANGE #include "dbus-maybe.h" #include "dbus-bindings.h" +#include "dbus-purple.h" typedef struct { char *text; diff -r 4691b5f80ac8 -r 57d350900136 libpurple/plugins/statenotify.c --- a/libpurple/plugins/statenotify.c Sat Sep 01 23:09:41 2007 +0000 +++ b/libpurple/plugins/statenotify.c Sat Sep 01 23:50:22 2007 +0000 @@ -46,10 +46,19 @@ old_available = purple_status_is_available(old_status); if (purple_prefs_get_bool("/plugins/core/statenotify/notify_away")) { + char *message = NULL; + const char *msgstatus = purple_status_get_attr_string(status, "message"); + msgstatus = msgstatus ? msgstatus : ""; if (available && !old_available) - write_status(buddy, _("%s is no longer away.")); + message = g_strdup_printf("%s%s%s", _("%s is no longer away"), msgstatus[0] ? ": " : ".", msgstatus); else if (!available && old_available) - write_status(buddy, _("%s has gone away.")); + message = g_strdup_printf("%s%s%s", ("%s has gone away"), msgstatus[0] ? ": " : ".", msgstatus); + else if (msgstatus[0]) + message = g_strdup_printf("%s %s", _("%s has changed status message to:"), msgstatus); + else + message = g_strdup(_("%s has removed his status message.")); + write_status(buddy, message); + g_free(message); } } diff -r 4691b5f80ac8 -r 57d350900136 libpurple/proxy.c --- a/libpurple/proxy.c Sat Sep 01 23:09:41 2007 +0000 +++ b/libpurple/proxy.c Sat Sep 01 23:50:22 2007 +0000 @@ -329,6 +329,7 @@ if (connect_data->fd >= 0) { + g_printerr("XXX: closing %d\n", connect_data->fd); close(connect_data->fd); connect_data->fd = -1; } diff -r 4691b5f80ac8 -r 57d350900136 libpurple/util.c --- a/libpurple/util.c Sat Sep 01 23:09:41 2007 +0000 +++ b/libpurple/util.c Sat Sep 01 23:50:22 2007 +0000 @@ -31,6 +31,14 @@ #include "prefs.h" #include "util.h" +#ifdef HAVE_DBUS +# define DBUS_API_SUBJECT_TO_CHANGE +# include +# include "dbus-purple.h" +# include "dbus-server.h" +# include "dbus-bindings.h" +#endif + struct _PurpleUtilFetchUrlData { PurpleUtilFetchUrlCallback callback; @@ -2533,6 +2541,24 @@ #endif } +static gboolean +write_dbus_file(const char *filename, const char *data, size_t size) +{ + DBusConnection *dbus_connection = NULL; + DBusMessage *msg = NULL; + if ((dbus_connection = purple_dbus_get_connection()) == NULL) + return FALSE; + msg = dbus_message_new_method_call(DBUS_SERVICE_PURPLE, DBUS_PATH_PURPLE, + DBUS_INTERFACE_PURPLE, "PurpleUtilWriteDataToFile"); + if (msg == NULL) + return NULL; + + dbus_message_append_args(msg, DBUS_TYPE_STRING, filename, DBUS_TYPE_STRING, data, + DBUS_TYPE_UINT32, size, DBUS_TYPE_INVALID); + dbus_connection_send(dbus_connection, msg, NULL); + return TRUE; +} + /* * This function is long and beautiful, like my--um, yeah. Anyway, * it includes lots of error checking so as we don't overwrite @@ -2546,7 +2572,12 @@ gboolean ret = FALSE; g_return_val_if_fail(user_dir != NULL, FALSE); - +#if 0 + if (!purple_dbus_is_owner()) { + if (write_dbus_file(filename, data, size)) + return TRUE; + } +#endif purple_debug_info("util", "Writing file %s to directory %s\n", filename, user_dir); @@ -2584,7 +2615,7 @@ filename_temp = g_strdup_printf("%s.save", filename_full); /* Remove an old temporary file, if one exists */ - if (g_file_test(filename_temp, G_FILE_TEST_EXISTS)) + if (g_file_test(filename_temp, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR)) { if (g_unlink(filename_temp) == -1) { diff -r 4691b5f80ac8 -r 57d350900136 pidgin/gtkblist.c --- a/pidgin/gtkblist.c Sat Sep 01 23:09:41 2007 +0000 +++ b/pidgin/gtkblist.c Sat Sep 01 23:50:22 2007 +0000 @@ -2622,6 +2622,7 @@ struct _pidgin_blist_node *gtknode; GdkRectangle mon_size; int sig; + const char *name; if (node == NULL) return; @@ -2679,8 +2680,9 @@ gtknode = node->ui_data; + name = gtk_window_get_title(GTK_WINDOW(gtk_widget_get_toplevel(widget))); gtk_widget_set_app_paintable(gtkblist->tipwindow, TRUE); - gtk_window_set_title(GTK_WINDOW(gtkblist->tipwindow), _("Buddy List")); + gtk_window_set_title(GTK_WINDOW(gtkblist->tipwindow), name ? name : _("Buddy List")); gtk_window_set_resizable(GTK_WINDOW(gtkblist->tipwindow), FALSE); gtk_widget_set_name(gtkblist->tipwindow, "gtk-tooltips"); g_signal_connect(G_OBJECT(gtkblist->tipwindow), "expose_event", diff -r 4691b5f80ac8 -r 57d350900136 pidgin/gtkimhtml.c --- a/pidgin/gtkimhtml.c Sat Sep 01 23:09:41 2007 +0000 +++ b/pidgin/gtkimhtml.c Sat Sep 01 23:50:22 2007 +0000 @@ -2101,9 +2101,9 @@ } *type = -1; - *len = close - string + 1; - *tag = g_strndup(string, *len - 1); - return TRUE; + *len = 0; //close - string + 1; + *tag = NULL; //g_strndup(string, *len - 1); + return FALSE; } static gchar* diff -r 4691b5f80ac8 -r 57d350900136 pidgin/gtkmain.c --- a/pidgin/gtkmain.c Sat Sep 01 23:09:41 2007 +0000 +++ b/pidgin/gtkmain.c Sat Sep 01 23:50:22 2007 +0000 @@ -877,3 +877,11 @@ return 0; } + +#undef g_file_test +gboolean my_g_file_test(const char *file, int test) +{ + g_printerr("XXX: checking for %s (%d)\n", file, test); + return g_file_test(file, test); +} + diff -r 4691b5f80ac8 -r 57d350900136 pidgin/gtkplugin.c --- a/pidgin/gtkplugin.c Sat Sep 01 23:09:41 2007 +0000 +++ b/pidgin/gtkplugin.c Sat Sep 01 23:50:22 2007 +0000 @@ -600,6 +600,7 @@ plugin_details = gtk_label_new(NULL); gtk_label_set_line_wrap(GTK_LABEL(plugin_details), TRUE); gtk_container_add(GTK_CONTAINER(expander), plugin_details); + gtk_expander_set_expanded(GTK_EXPANDER(expander), TRUE); gtk_widget_set_sensitive(expander, FALSE); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(plugin_dialog)->vbox), expander, FALSE, FALSE, 0); diff -r 4691b5f80ac8 -r 57d350900136 pidgin/plugins/perl/common/GtkDialogs.xs --- a/pidgin/plugins/perl/common/GtkDialogs.xs Sat Sep 01 23:09:41 2007 +0000 +++ b/pidgin/plugins/perl/common/GtkDialogs.xs Sat Sep 01 23:50:22 2007 +0000 @@ -7,7 +7,8 @@ pidgin_dialogs_destroy_all() void -pidgin_dialogs_about() +pidgin_dialogs_about(parent) + GtkWidget * parent void pidgin_dialogs_im()