Mercurial > pidgin
changeset 22288:f1fa491504eb
merge of '902c6324faa755dfbceafd40ebf88ef850d06c9b'
and 'a0772f771a053d37ada885e7b6826abb1091ed55'
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Tue, 12 Feb 2008 04:03:30 +0000 |
parents | 36036b9489fe (diff) d680613669cc (current diff) |
children | 0ba0f2804299 b6fac84a0974 |
files | |
diffstat | 7 files changed, 16 insertions(+), 30 deletions(-) [+] |
line wrap: on
line diff
--- a/COPYRIGHT Tue Feb 12 04:02:23 2008 +0000 +++ b/COPYRIGHT Tue Feb 12 04:03:30 2008 +0000 @@ -255,6 +255,7 @@ David Mohr Andrew Molloy Michael Monreal +Marco Monteiro Benjamin Moody John Moody Tim Mooney @@ -274,6 +275,7 @@ Ruediger Oertel Gudmundur Bjarni Olafsson Bartosz Oler +Oliver Stefan Ott Shawn Outman Nathan Owens (pianocomp81)
--- a/libpurple/protocols/oscar/oscar.c Tue Feb 12 04:02:23 2008 +0000 +++ b/libpurple/protocols/oscar/oscar.c Tue Feb 12 04:03:30 2008 +0000 @@ -6609,18 +6609,18 @@ g_return_val_if_fail(str != NULL, NULL); - strncpy(buf, str, BUF_LEN); - for (i=0, j=0; buf[j]; i++, j++) + /* copy str to buf and skip all blanks */ + for (i=0, j=0; str[j] && i < BUF_LEN; i++, j++) { - while (buf[j] == ' ') + while (str[j] == ' ') j++; - buf[i] = buf[j]; + buf[i] = str[j]; } buf[i] = '\0'; tmp1 = g_utf8_strdown(buf, -1); tmp2 = g_utf8_normalize(tmp1, -1, G_NORMALIZE_DEFAULT); - g_snprintf(buf, sizeof(buf), "%s", tmp2); + strcpy(buf, tmp2); g_free(tmp2); g_free(tmp1);
--- a/pidgin/gtkconv.c Tue Feb 12 04:02:23 2008 +0000 +++ b/pidgin/gtkconv.c Tue Feb 12 04:03:30 2008 +0000 @@ -238,7 +238,10 @@ switch (purple_conversation_get_type(conv)) { case PURPLE_CONV_TYPE_IM: { - hide_conv(gtkconv, TRUE); + if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/im/close_immediately")) + close_this_sucker(gtkconv); + else + hide_conv(gtkconv, TRUE); break; } case PURPLE_CONV_TYPE_CHAT: @@ -1186,17 +1189,6 @@ } static void -menu_send_attention_cb(gpointer data, guint action, GtkWidget *widget) -{ - PidginWindow *win = data; - PurpleConversation *conv = pidgin_conv_window_get_active_conversation(win); - - if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM) { - serv_send_attention(purple_conversation_get_gc(conv), purple_conversation_get_name(conv), 0); - } -} - -static void menu_add_pounce_cb(gpointer data, guint action, GtkWidget *widget) { PidginWindow *win = data; @@ -2963,7 +2955,6 @@ { "/Conversation/sep1", NULL, NULL, 0, "<Separator>", NULL }, { N_("/Conversation/Se_nd File..."), NULL, menu_send_file_cb, 0, "<StockItem>", PIDGIN_STOCK_TOOLBAR_SEND_FILE }, - { N_("/Conversation/Send _Attention..."), NULL, menu_send_attention_cb, 0, "<StockItem>", PIDGIN_STOCK_TOOLBAR_SEND_ATTENTION }, { N_("/Conversation/Add Buddy _Pounce..."), NULL, menu_add_pounce_cb, 0, "<Item>", NULL }, { N_("/Conversation/_Get Info"), "<CTL>O", menu_get_info_cb, 0, @@ -3270,9 +3261,6 @@ gtk_item_factory_get_widget(win->menu.item_factory, N_("/Conversation/Send File...")); - win->menu.send_attention = - gtk_item_factory_get_widget(win->menu.item_factory, - N_("/Conversation/Send Attention")); win->menu.add_pounce = gtk_item_factory_get_widget(win->menu.item_factory, N_("/Conversation/Add Buddy Pounce...")); @@ -6260,7 +6248,6 @@ /* Deal with menu items */ gtk_widget_show(win->menu.view_log); gtk_widget_show(win->menu.send_file); - gtk_widget_show(win->menu.send_attention); gtk_widget_show(win->menu.add_pounce); gtk_widget_show(win->menu.get_info); gtk_widget_hide(win->menu.invite); @@ -6289,7 +6276,6 @@ /* Deal with menu items */ gtk_widget_show(win->menu.view_log); gtk_widget_hide(win->menu.send_file); - gtk_widget_hide(win->menu.send_attention); gtk_widget_hide(win->menu.add_pounce); gtk_widget_hide(win->menu.get_info); gtk_widget_show(win->menu.invite); @@ -6362,7 +6348,6 @@ gtk_widget_set_sensitive(win->menu.send_file, (prpl_info->send_file != NULL && (!prpl_info->can_receive_file || prpl_info->can_receive_file(gc, purple_conversation_get_name(conv))))); - gtk_widget_set_sensitive(win->menu.send_attention, (prpl_info->send_attention != NULL)); gtk_widget_set_sensitive(win->menu.alias, (account != NULL) && (purple_find_buddy(account, purple_conversation_get_name(conv)) != NULL)); @@ -6383,7 +6368,6 @@ /* Then deal with menu items */ gtk_widget_set_sensitive(win->menu.view_log, TRUE); gtk_widget_set_sensitive(win->menu.send_file, FALSE); - gtk_widget_set_sensitive(win->menu.send_attention, FALSE); gtk_widget_set_sensitive(win->menu.add_pounce, TRUE); gtk_widget_set_sensitive(win->menu.get_info, FALSE); gtk_widget_set_sensitive(win->menu.invite, FALSE); @@ -7660,6 +7644,7 @@ purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/conversations/im/show_buddy_icons", TRUE); purple_prefs_add_string(PIDGIN_PREFS_ROOT "/conversations/im/hide_new", "never"); + purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/conversations/im/close_immediately", TRUE); #ifdef _WIN32 purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/win32/minimize_new_convs", FALSE);
--- a/pidgin/gtkconvwin.h Tue Feb 12 04:02:23 2008 +0000 +++ b/pidgin/gtkconvwin.h Tue Feb 12 04:03:30 2008 +0000 @@ -51,7 +51,6 @@ GtkWidget *view_log; GtkWidget *send_file; - GtkWidget *send_attention; GtkWidget *add_pounce; GtkWidget *get_info; GtkWidget *invite;
--- a/pidgin/gtkprefs.c Tue Feb 12 04:02:23 2008 +0000 +++ b/pidgin/gtkprefs.c Tue Feb 12 04:03:30 2008 +0000 @@ -943,6 +943,8 @@ pidgin_prefs_checkbox(_("Show _formatting on incoming messages"), PIDGIN_PREFS_ROOT "/conversations/show_incoming_formatting", vbox); + pidgin_prefs_checkbox(_("Close IMs immediately when the tab is closed"), + PIDGIN_PREFS_ROOT "/conversations/im/close_immediately", vbox); iconpref1 = pidgin_prefs_checkbox(_("Show _detailed information"), PIDGIN_PREFS_ROOT "/conversations/im/show_buddy_icons", vbox); @@ -976,7 +978,8 @@ fontpref = pidgin_prefs_checkbox(_("Use font from _theme"), PIDGIN_PREFS_ROOT "/conversations/use_theme_font", vbox); font_name = purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/custom_font"); - font_button = gtk_font_button_new_with_font(font_name ? font_name : ""); + font_button = gtk_font_button_new_with_font(font_name ? font_name : NULL); + gtk_font_button_set_show_style(GTK_FONT_BUTTON(font_button), TRUE); hbox = pidgin_add_widget_to_vbox(GTK_BOX(vbox), _("Conversation _font:"), NULL, font_button, FALSE, NULL); if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/use_theme_font")) @@ -2194,7 +2197,6 @@ purple_prefs_remove(PIDGIN_PREFS_ROOT "/blist/show_group_count"); purple_prefs_remove(PIDGIN_PREFS_ROOT "/blist/show_warning_level"); purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/button_type"); - purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/close_immediately"); purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/ctrl_enter_sends"); purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/enter_sends"); purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/escape_closes");
--- a/pidgin/pidginstock.c Tue Feb 12 04:02:23 2008 +0000 +++ b/pidgin/pidginstock.c Tue Feb 12 04:03:30 2008 +0000 @@ -168,7 +168,6 @@ { PIDGIN_STOCK_TOOLBAR_UNBLOCK, "toolbar", "unblock.png", FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL }, { PIDGIN_STOCK_TOOLBAR_SELECT_AVATAR, "toolbar", "select-avatar.png", FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, NULL }, { PIDGIN_STOCK_TOOLBAR_SEND_FILE, "toolbar", "send-file.png", FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL }, - { PIDGIN_STOCK_TOOLBAR_SEND_ATTENTION, "toolbar", "send-attention.png", FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL }, { PIDGIN_STOCK_TRAY_AVAILABLE, "tray", "tray-online.png", FALSE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, NULL }, { PIDGIN_STOCK_TRAY_INVISIBLE, "tray", "tray-invisible.png", FALSE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, NULL },
--- a/pidgin/pidginstock.h Tue Feb 12 04:02:23 2008 +0000 +++ b/pidgin/pidginstock.h Tue Feb 12 04:03:30 2008 +0000 @@ -129,7 +129,6 @@ #define PIDGIN_STOCK_TOOLBAR_UNBLOCK "pidgin-unblock" #define PIDGIN_STOCK_TOOLBAR_SELECT_AVATAR "pidgin-select-avatar" #define PIDGIN_STOCK_TOOLBAR_SEND_FILE "pidgin-send-file" -#define PIDGIN_STOCK_TOOLBAR_SEND_ATTENTION "pidgin-send-attention" /* Tray icons */ #define PIDGIN_STOCK_TRAY_AVAILABLE "pidgin-tray-available"