Mercurial > pidgin
changeset 7859:e873d0bd0e6c
[gaim-migrate @ 8513]
I changed some stuff with conversation menus. Stuff is renamed,
moved around, not grayed out, grayed out, visible, somewhat works
for chats, etc. Ima finish this tomorrow because it's 6 o'freaking
clock. It shouldn't make anything worse, and might make some things
better.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 14 Dec 2003 11:03:54 +0000 |
parents | 1ce040412bd5 |
children | 9d4753944c9f |
files | src/away.c src/blist.c src/blist.h src/gtkaccount.c src/gtkblist.c src/gtkconv.c src/gtkconv.h src/gtkft.c src/gtkutils.c |
diffstat | 9 files changed, 86 insertions(+), 74 deletions(-) [+] |
line wrap: on
line diff
--- a/src/away.c Sun Dec 14 07:00:43 2003 +0000 +++ b/src/away.c Sun Dec 14 11:03:54 2003 +0000 @@ -205,7 +205,7 @@ if (strlen(a->name)) gtk_window_set_title(GTK_WINDOW(imaway), a->name); else - gtk_window_set_title(GTK_WINDOW(imaway), _("Gaim - Away!")); + gtk_window_set_title(GTK_WINDOW(imaway), _("Away!")); g_signal_connect(G_OBJECT(imaway), "destroy", G_CALLBACK(do_im_back), imaway); gtk_widget_realize(imaway);
--- a/src/blist.c Sun Dec 14 07:00:43 2003 +0000 +++ b/src/blist.c Sun Dec 14 11:03:54 2003 +0000 @@ -2206,14 +2206,14 @@ } void -gaim_blist_request_add_chat(GaimAccount *account, GaimGroup *group) +gaim_blist_request_add_chat(GaimAccount *account, GaimGroup *group, const char *alias) { GaimBlistUiOps *ui_ops; ui_ops = gaim_blist_get_ui_ops(); if (ui_ops != NULL && ui_ops->request_add_chat != NULL) - ui_ops->request_add_chat(account, group); + ui_ops->request_add_chat(account, group, alias); } void
--- a/src/blist.h Sun Dec 14 07:00:43 2003 +0000 +++ b/src/blist.h Sun Dec 14 11:03:54 2003 +0000 @@ -176,7 +176,8 @@ gboolean show); /**< Hides or unhides the buddy list */ void (*request_add_buddy)(GaimAccount *account, const char *username, const char *group, const char *alias); - void (*request_add_chat)(GaimAccount *account, GaimGroup *group); + void (*request_add_chat)(GaimAccount *account, GaimGroup *group, + const char *alias); void (*request_add_group)(void); }; @@ -694,7 +695,8 @@ * @param account The account the buddy is added to. * @param group The optional group to add the chat to. */ -void gaim_blist_request_add_chat(GaimAccount *account, GaimGroup *group); +void gaim_blist_request_add_chat(GaimAccount *account, GaimGroup *group, + const char *alias); /** * Requests from the user information needed to add a group to the
--- a/src/gtkaccount.c Sun Dec 14 07:00:43 2003 +0000 +++ b/src/gtkaccount.c Sun Dec 14 11:03:54 2003 +0000 @@ -2081,7 +2081,7 @@ if (buddy != NULL) { - gaim_notify_info(NULL, NULL, _("Gaim - Information"), buffer); + gaim_notify_info(NULL, NULL, _("Information"), buffer); } else {
--- a/src/gtkblist.c Sun Dec 14 07:00:43 2003 +0000 +++ b/src/gtkblist.c Sun Dec 14 11:03:54 2003 +0000 @@ -712,14 +712,14 @@ if(gtk_tree_selection_get_selected(sel, NULL, &iter)){ gtk_tree_model_get(GTK_TREE_MODEL(gtkblist->treemodel), &iter, NODE_COLUMN, &node, -1); if (GAIM_BLIST_NODE_IS_BUDDY(node)) - gaim_blist_request_add_chat(NULL, (GaimGroup*)node->parent->parent); + gaim_blist_request_add_chat(NULL, (GaimGroup*)node->parent->parent, NULL); if (GAIM_BLIST_NODE_IS_CONTACT(node) || GAIM_BLIST_NODE_IS_CHAT(node)) - gaim_blist_request_add_chat(NULL, (GaimGroup*)node->parent); + gaim_blist_request_add_chat(NULL, (GaimGroup*)node->parent, NULL); else if (GAIM_BLIST_NODE_IS_GROUP(node)) - gaim_blist_request_add_chat(NULL, (GaimGroup*)node); + gaim_blist_request_add_chat(NULL, (GaimGroup*)node, NULL); } else { - gaim_blist_request_add_chat(NULL, NULL); + gaim_blist_request_add_chat(NULL, NULL, NULL); } } @@ -3514,7 +3514,8 @@ } void -gaim_gtk_blist_request_add_chat(GaimAccount *account, GaimGroup *group) +gaim_gtk_blist_request_add_chat(GaimAccount *account, GaimGroup *group, + const char *alias) { GaimGtkAddChatData *data; GaimGtkBuddyList *gtkblist; @@ -3620,6 +3621,8 @@ gtk_box_pack_start(GTK_BOX(rowbox), label, FALSE, FALSE, 0); data->alias_entry = gtk_entry_new(); + if (alias != NULL) + gtk_entry_set_text(GTK_ENTRY(data->alias_entry), alias); gtk_box_pack_end(GTK_BOX(rowbox), data->alias_entry, TRUE, TRUE, 0); rowbox = gtk_hbox_new(FALSE, 5);
--- a/src/gtkconv.c Sun Dec 14 07:00:43 2003 +0000 +++ b/src/gtkconv.c Sun Dec 14 11:03:54 2003 +0000 @@ -481,17 +481,30 @@ add_cb(GtkWidget *widget, GaimConversation *conv) { GaimAccount *account; - GaimBuddy *b; const char *name; + GaimConversationType type; account = gaim_conversation_get_account(conv); name = gaim_conversation_get_name(conv); - b = gaim_find_buddy(account, name); - - if (b != NULL) - show_confirm_del(b); - else if (account != NULL && gaim_account_is_connected(account)) - gaim_blist_request_add_buddy(account, (char *)name, NULL, NULL); + type = gaim_conversation_get_type(conv); + + if (GAIM_CONV_IM(conv)) { + GaimBuddy *b; + + b = gaim_find_buddy(account, name); + if (b != NULL) + show_confirm_del(b); + else if (account != NULL && gaim_account_is_connected(account)) + gaim_blist_request_add_buddy(account, (char *)name, NULL, NULL); + } else if (GAIM_CONV_CHAT(conv)) { + GaimChat *c; + + c = gaim_blist_find_chat(account, name); + if (c != NULL) + show_confirm_del_blist_chat(c); + else if (account != NULL && gaim_account_is_connected(account)) + gaim_blist_request_add_chat(account, NULL, NULL); + } gtk_widget_grab_focus(GAIM_GTK_CONVERSATION(conv)->entry); } @@ -606,7 +619,7 @@ /* Create the new dialog. */ invite_dialog = gtk_dialog_new_with_buttons( - _("Gaim - Invite Buddy Into Chat Room"), + _("Invite Buddy Into Chat Room"), GTK_WINDOW(gtkwin->window), GTK_DIALOG_MODAL, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); @@ -2077,40 +2090,37 @@ /* Update the menubar */ if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) { gtk_widget_show(gtkwin->menu.view_log); - - if (gc && prpl_info->options & OPT_PROTO_IM_IMAGE) { - gtk_widget_show(gtkwin->menu.insert_image); - gtk_widget_set_sensitive(gtkconv->toolbar.image, TRUE); - - } - else { - gtk_widget_hide(gtkwin->menu.insert_image); - gtk_widget_set_sensitive(gtkconv->toolbar.image, FALSE); - } - gtk_widget_show(gtkwin->menu.add_pounce); gtk_widget_show(gtkwin->menu.get_info); + gtk_widget_hide(gtkwin->menu.invite); + + gtk_widget_show(gtkwin->menu.insert_image); + if (gc && prpl_info->options & OPT_PROTO_IM_IMAGE) + gtk_widget_set_sensitive(gtkwin->menu.insert_image, TRUE); + else + gtk_widget_set_sensitive(gtkwin->menu.insert_image, FALSE); + gtk_widget_show(gtkwin->menu.warn); + if (gc && prpl_info->warn != NULL) + gtk_widget_set_sensitive(gtkwin->menu.warn, TRUE); + else + gtk_widget_set_sensitive(gtkwin->menu.warn, FALSE); + gtk_widget_show(gtkwin->menu.block); if (gaim_find_buddy(gaim_conversation_get_account(conv), gaim_conversation_get_name(conv)) == NULL) { - gtk_widget_show(gtkwin->menu.add); gtk_widget_hide(gtkwin->menu.remove); gtk_widget_set_sensitive(gtkwin->menu.alias, FALSE); - } - else { + } else { gtk_widget_show(gtkwin->menu.remove); gtk_widget_hide(gtkwin->menu.add); gtk_widget_set_sensitive(gtkwin->menu.alias, TRUE); } - gtk_widget_set_sensitive(gtkwin->menu.add, TRUE); gtk_widget_set_sensitive(gtkwin->menu.remove, TRUE); - gtk_widget_hide(gtkwin->menu.invite); - if (gtkwin->menu.send_as != NULL) g_timeout_add(0, (GSourceFunc)update_send_as_selection, win); @@ -2122,32 +2132,29 @@ } } else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) { + gtk_widget_hide(gtkwin->menu.view_log); + gtk_widget_hide(gtkwin->menu.add_pounce); + gtk_widget_hide(gtkwin->menu.get_info); gtk_widget_show(gtkwin->menu.invite); - gtk_widget_hide(gtkwin->menu.view_log); gtk_widget_hide(gtkwin->menu.insert_image); gtk_widget_set_sensitive(gtkconv->toolbar.image, FALSE); - gtk_widget_set_sensitive(gtkwin->menu.alias, FALSE); - - gtk_widget_hide(gtkwin->menu.add_pounce); - gtk_widget_hide(gtkwin->menu.get_info); gtk_widget_hide(gtkwin->menu.warn); gtk_widget_hide(gtkwin->menu.block); if (gaim_find_chat(gaim_conversation_get_gc(conv), gaim_conv_chat_get_id(GAIM_CONV_CHAT(conv))) == NULL) { - gtk_widget_show(gtkwin->menu.add); gtk_widget_hide(gtkwin->menu.remove); - } - else { + gtk_widget_set_sensitive(gtkwin->menu.alias, FALSE); + } else { gtk_widget_show(gtkwin->menu.remove); gtk_widget_hide(gtkwin->menu.add); + gtk_widget_set_sensitive(gtkwin->menu.alias, TRUE); } - - gtk_widget_set_sensitive(gtkwin->menu.add, FALSE); - gtk_widget_set_sensitive(gtkwin->menu.remove, FALSE); + gtk_widget_set_sensitive(gtkwin->menu.add, TRUE); + gtk_widget_set_sensitive(gtkwin->menu.remove, TRUE); if (gtkwin->menu.send_as != NULL) g_timeout_add(0, (GSourceFunc)update_send_as_selection, win); @@ -2860,7 +2867,7 @@ char buf[BUF_LONG]; GtkWidget *window; - window = gtk_file_selection_new(_("Gaim - Save Conversation")); + window = gtk_file_selection_new(_("Save Conversation")); g_snprintf(buf, sizeof(buf), "%s" G_DIR_SEPARATOR_S "%s.log", gaim_home_dir(), gaim_normalize(c->account, c->name)); @@ -2879,38 +2886,31 @@ /* Conversation menu */ { N_("/_Conversation"), NULL, NULL, 0, "<Branch>" }, - { N_("/Conversation/_New Conversation..."), NULL, menu_new_conv_cb, - 0, "<StockItem>", GTK_STOCK_NEW }, - - { "/Conversation/sep0", NULL, NULL, 0, "<Separator>" }, - + { N_("/Conversation/New _Instant Message..."), "<CTL>I", menu_new_conv_cb, + 0, "<StockItem>", GAIM_STOCK_IM }, + + { "/Conversation/sep0", NULL, NULL, 0, "<Separator>" }, + + { N_("/Conversation/Find..."), NULL, menu_find_cb, 0, "<StockItem>", GTK_STOCK_FIND }, + { N_("/Conversation/View _Log"), NULL, menu_view_log_cb, 0, NULL }, { N_("/Conversation/_Save As..."), NULL, menu_save_as_cb, 0, "<StockItem>", GTK_STOCK_SAVE_AS }, - { N_("/Conversation/View _Log"), NULL, menu_view_log_cb, 0, NULL }, - { N_("/Conversation/Find..."), NULL, menu_find_cb, 0, "<StockItem>", GTK_STOCK_FIND }, { "/Conversation/sep1", NULL, NULL, 0, "<Separator>" }, { N_("/Conversation/Add Buddy _Pounce..."), NULL, menu_add_pounce_cb, 0, NULL }, - { N_("/Conversation/A_lias..."), NULL, menu_alias_cb, 0, - "<StockItem>", GAIM_STOCK_EDIT }, - { N_("/Conversation/_Get Info..."), NULL, menu_get_info_cb, 0, + { N_("/Conversation/_Get Info"), NULL, menu_get_info_cb, 0, "<StockItem>", GAIM_STOCK_INFO }, + { N_("/Conversation/_Warn..."), NULL, menu_warn_cb, 0, + "<StockItem>", GAIM_STOCK_WARN }, { N_("/Conversation/In_vite..."), NULL, menu_invite_cb, 0, "<StockItem>", GAIM_STOCK_INVITE }, { "/Conversation/sep2", NULL, NULL, 0, "<Separator>" }, - { N_("/Conversation/Insert Lin_k..."), NULL, menu_insert_link_cb, 0, - "<StockItem>", GAIM_STOCK_LINK }, - { N_("/Conversation/Insert _Image..."), NULL, menu_insert_image_cb, 0, - "<StockItem>", GAIM_STOCK_IMAGE }, - - { "/Conversation/sep3", NULL, NULL, 0, "<Separator>" }, - - { N_("/Conversation/_Warn..."), NULL, menu_warn_cb, 0, - "<StockItem>", GAIM_STOCK_WARN }, + { N_("/Conversation/A_lias..."), NULL, menu_alias_cb, 0, + "<StockItem>", GAIM_STOCK_EDIT }, { N_("/Conversation/_Block..."), NULL, menu_block_cb, 0, "<StockItem>", GAIM_STOCK_BLOCK }, { N_("/Conversation/_Add..."), NULL, menu_add_remove_cb, 0, @@ -2918,6 +2918,13 @@ { N_("/Conversation/_Remove..."), NULL, menu_add_remove_cb, 0, "<StockItem>", GTK_STOCK_REMOVE }, + { "/Conversation/sep3", NULL, NULL, 0, "<Separator>" }, + + { N_("/Conversation/Insert Lin_k..."), NULL, menu_insert_link_cb, 0, + "<StockItem>", GAIM_STOCK_LINK }, + { N_("/Conversation/Insert Imag_e..."), NULL, menu_insert_image_cb, 0, + "<StockItem>", GAIM_STOCK_IMAGE }, + { "/Conversation/sep4", NULL, NULL, 0, "<Separator>" }, { N_("/Conversation/_Close"), NULL, menu_close_conv_cb, 0, @@ -2982,7 +2989,7 @@ gtkwin->menu.get_info = gtk_item_factory_get_widget(gtkwin->menu.item_factory, - N_("/Conversation/Get Info...")); + N_("/Conversation/Get Info")); gtkwin->menu.invite = gtk_item_factory_get_widget(gtkwin->menu.item_factory,
--- a/src/gtkconv.h Sun Dec 14 07:00:43 2003 +0000 +++ b/src/gtkconv.h Sun Dec 14 11:03:54 2003 +0000 @@ -56,14 +56,14 @@ GtkWidget *get_info; GtkWidget *invite; + GtkWidget *insert_link; + GtkWidget *insert_image; + GtkWidget *warn; GtkWidget *block; GtkWidget *add; GtkWidget *remove; - GtkWidget *insert_link; - GtkWidget *insert_image; - GtkWidget *logging; GtkWidget *sounds; GtkWidget *show_formatting_toolbar;
--- a/src/gtkft.c Sun Dec 14 07:00:43 2003 +0000 +++ b/src/gtkft.c Sun Dec 14 11:03:54 2003 +0000 @@ -1097,9 +1097,9 @@ cur_dir = g_get_current_dir(); if (gaim_xfer_get_type(xfer) == GAIM_XFER_SEND) - data->filesel = gtk_file_selection_new(_("Gaim - Open...")); + data->filesel = gtk_file_selection_new(_("Open...")); else - data->filesel = gtk_file_selection_new(_("Gaim - Save As...")); + data->filesel = gtk_file_selection_new(_("Save As...")); if (gaim_xfer_get_filename(xfer) == NULL) init_str = g_strdup_printf("%s" G_DIR_SEPARATOR_S, cur_dir);
--- a/src/gtkutils.c Sun Dec 14 07:00:43 2003 +0000 +++ b/src/gtkutils.c Sun Dec 14 11:03:54 2003 +0000 @@ -328,7 +328,7 @@ return; } - gtkconv->u.im->save_icon = gtk_file_selection_new(_("Gaim - Save Icon")); + gtkconv->u.im->save_icon = gtk_file_selection_new(_("Save Icon")); gtk_file_selection_hide_fileop_buttons( GTK_FILE_SELECTION(gtkconv->u.im->save_icon));