Mercurial > pidgin
changeset 19374:d65ce3df5be2
Make some of the dialogs look and behave more like each other.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Thu, 23 Aug 2007 07:05:03 +0000 |
parents | c3d2abac662e |
children | f520bf6dd4bc |
files | finch/gntft.c finch/gntpounce.c finch/gntstatus.c |
diffstat | 3 files changed, 23 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/finch/gntft.c Thu Aug 23 06:28:15 2007 +0000 +++ b/finch/gntft.c Thu Aug 23 07:05:03 2007 +0000 @@ -193,6 +193,8 @@ g_signal_connect(G_OBJECT(window), "destroy", G_CALLBACK(finch_xfer_dialog_destroy), NULL); gnt_box_set_toplevel(GNT_BOX(window), TRUE); gnt_box_set_title(GNT_BOX(window), _("File Transfers")); + gnt_box_set_fill(GNT_BOX(window), TRUE); + gnt_box_set_alignment(GNT_BOX(window), GNT_ALIGN_MID); xfer_dialog->tree = tree = gnt_tree_new_with_columns(NUM_COLUMNS); gnt_tree_set_column_titles(GNT_TREE(tree), _("Progress"), _("Filename"), _("Size"), _("Speed"), _("Remaining"), _("Status")); @@ -219,7 +221,7 @@ G_CALLBACK(toggle_clear_finished_cb), NULL); gnt_box_add_widget(GNT_BOX(window), checkbox); - bbox = gnt_hbox_new(TRUE); + bbox = gnt_hbox_new(FALSE); xfer_dialog->remove_button = button = gnt_button_new(_("Remove")); g_signal_connect(G_OBJECT(button), "activate", @@ -425,8 +427,11 @@ g_free(remaining_str); g_free(kbsec); if (purple_xfer_is_completed(xfer)) { + char *msg = g_strdup_printf(_("The file was saved as %s."), purple_xfer_get_local_filename(xfer)); gnt_tree_change_text(GNT_TREE(xfer_dialog->tree), xfer, COLUMN_STATUS, _("Finished")); gnt_tree_change_text(GNT_TREE(xfer_dialog->tree), xfer, COLUMN_REMAINING, _("Finished")); + purple_xfer_conversation_write(xfer, msg, FALSE); + g_free(msg); } else { gnt_tree_change_text(GNT_TREE(xfer_dialog->tree), xfer, COLUMN_STATUS, _("Transferring")); }
--- a/finch/gntpounce.c Thu Aug 23 06:28:15 2007 +0000 +++ b/finch/gntpounce.c Thu Aug 23 07:05:03 2007 +0000 @@ -452,7 +452,7 @@ gnt_box_add_widget(GNT_BOX(window), gnt_line_new(FALSE)); /* Now the button box! */ - bbox = gnt_hbox_new(TRUE); + bbox = gnt_hbox_new(FALSE); /* Cancel button */ button = gnt_button_new(_("Cancel")); @@ -613,6 +613,12 @@ static void pounces_manager_add_cb(GntButton *button, gpointer user_data) { + if (purple_accounts_get_all() == NULL) { + purple_notify_error(NULL, _("Cannot create pounce"), + _("You do not have any accounts."), + _("You must create an account first before you can create a pounce.")); + return; + } finch_pounce_editor_show(NULL, NULL, NULL); } @@ -622,7 +628,8 @@ { PouncesManager *dialog = user_data; PurplePounce *pounce = gnt_tree_get_selection_data(GNT_TREE(dialog->tree)); - finch_pounce_editor_show(NULL, NULL, pounce); + if (pounce) + finch_pounce_editor_show(NULL, NULL, pounce); } static void @@ -645,6 +652,9 @@ char *buf; pounce = (PurplePounce *)gnt_tree_get_selection_data(GNT_TREE(dialog->tree)); + if (pounce == NULL) + return; + account = purple_pounce_get_pouncer(pounce); pouncer = purple_account_get_username(account); pouncee = purple_pounce_get_pouncee(pounce); @@ -696,7 +706,7 @@ gnt_box_add_widget(GNT_BOX(win), tree); /* Button box. */ - bbox = gnt_hbox_new(TRUE); + bbox = gnt_hbox_new(FALSE); /* Add button */ button = gnt_button_new(_("Add"));
--- a/finch/gntstatus.c Thu Aug 23 06:28:15 2007 +0000 +++ b/finch/gntstatus.c Thu Aug 23 07:05:03 2007 +0000 @@ -299,6 +299,7 @@ { purple_notify_error(edit, _("Error"), _("Invalid title"), _("Please enter a non-empty title for the status.")); + gnt_box_give_focus_to_child(GNT_BOX(edit->window), edit->title); return; } @@ -307,6 +308,7 @@ { purple_notify_error(edit, _("Error"), _("Duplicate title"), _("Please enter a different title for the status.")); + gnt_box_give_focus_to_child(GNT_BOX(edit->window), edit->title); return; } @@ -447,6 +449,7 @@ sub->window = window = gnt_vbox_new(FALSE); gnt_box_set_toplevel(GNT_BOX(window), TRUE); gnt_box_set_title(GNT_BOX(window), _("Substatus")); /* XXX: a better title */ + gnt_box_set_alignment(GNT_BOX(window), GNT_ALIGN_MID); box = gnt_hbox_new(FALSE); gnt_box_add_widget(GNT_BOX(box), gnt_label_new(_("Account:"))); @@ -523,7 +526,7 @@ gnt_box_set_toplevel(GNT_BOX(window), TRUE); gnt_box_set_title(GNT_BOX(window), _("Edit Status")); gnt_box_set_fill(GNT_BOX(window), TRUE); - gnt_box_set_alignment(GNT_BOX(window), GNT_ALIGN_LEFT); + gnt_box_set_alignment(GNT_BOX(window), GNT_ALIGN_MID); gnt_box_set_pad(GNT_BOX(window), 0); edits = g_list_append(edits, edit);