diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2007-01-26 06:34:05 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2007-01-26 06:34:05 +0000 |
commit | 9737e535fb7659717e6ae79a7c24964e61d205a1 (patch) | |
tree | 92ddb92087eea14e9b33687b1ec1abe7928b07c2 | |
parent | 980184bb430c44fdd4cd90eef9e230fc379c8d36 (diff) |
set toolbar customization dialog title and label.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1504 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | ChangeLog.ja | 7 | ||||
-rw-r--r-- | src/mainwindow.c | 36 | ||||
-rw-r--r-- | src/prefs_display_items.c | 6 | ||||
-rw-r--r-- | src/prefs_display_items.h | 2 | ||||
-rw-r--r-- | src/prefs_summary_column.c | 3 | ||||
-rw-r--r-- | src/prefs_toolbar.c | 9 |
7 files changed, 52 insertions, 18 deletions
@@ -1,5 +1,12 @@ 2007-01-26 + * src/prefs_toolbar.c + src/mainwindow.c + src/prefs_display_items.[ch]: set dialog title and label. + * src/prefs_summary_column.c: place window on the center of parent. + +2007-01-26 + * src/compose.c src/prefs_toolbar.[ch] src/mainwindow.c diff --git a/ChangeLog.ja b/ChangeLog.ja index ae4e4d28..4ede221d 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,5 +1,12 @@ 2007-01-26 + * src/prefs_toolbar.c + src/mainwindow.c + src/prefs_display_items.[ch]: ダイアログのタイトルとラベルをセット。 + * src/prefs_summary_column.c: ウィンドウを親の中央に配置。 + +2007-01-26 + * src/compose.c src/prefs_toolbar.[ch] src/mainwindow.c diff --git a/src/mainwindow.c b/src/mainwindow.c index 92ac3054..286b27b6 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -117,6 +117,9 @@ static void main_window_menu_callback_unblock (MainWindow *mainwin); static void main_window_show_cur_account (MainWindow *mainwin); +static void main_window_set_toolbar_button_visibility + (MainWindow *mainwin); + static void main_window_set_widgets (MainWindow *mainwin, SeparateType type); static GtkWidget *main_window_toolbar_create (MainWindow *mainwin); @@ -1225,20 +1228,7 @@ void main_window_reflect_prefs_all(void) main_window_show_cur_account(mainwin); main_window_set_menu_sensitive(mainwin); main_window_set_toolbar_sensitive(mainwin); - - if (mainwin->junk_btn) { - if (prefs_common.enable_junk) - gtk_widget_show(mainwin->junk_btn); - else - gtk_widget_hide(mainwin->junk_btn); - } - - if (mainwin->exec_btn) { - if (prefs_common.immediate_exec) - gtk_widget_hide(mainwin->exec_btn); - else - gtk_widget_show(mainwin->exec_btn); - } + main_window_set_toolbar_button_visibility(mainwin); if (mainwin->tray_icon) { if (prefs_common.show_trayicon) @@ -1909,6 +1899,23 @@ void main_window_set_toolbar_sensitive(MainWindow *mainwin) } } +static void main_window_set_toolbar_button_visibility(MainWindow *mainwin) +{ + if (mainwin->junk_btn) { + if (prefs_common.enable_junk) + gtk_widget_show(mainwin->junk_btn); + else + gtk_widget_hide(mainwin->junk_btn); + } + + if (mainwin->exec_btn) { + if (prefs_common.immediate_exec) + gtk_widget_hide(mainwin->exec_btn); + else + gtk_widget_show(mainwin->exec_btn); + } +} + void main_window_set_menu_sensitive(MainWindow *mainwin) { GtkItemFactory *ifactory = mainwin->menu_factory; @@ -2610,6 +2617,7 @@ static void toolbar_customize(GtkWidget *widget, gpointer data) gtk_box_reorder_child(GTK_BOX(mainwin->vbox), toolbar, 1); mainwin->toolbar = toolbar; main_window_set_toolbar_sensitive(mainwin); + main_window_set_toolbar_button_visibility(mainwin); g_free(prefs_common.main_toolbar_setting); prefs_common.main_toolbar_setting = prefs_toolbar_get_name_list_from_item_list(item_list); diff --git a/src/prefs_display_items.c b/src/prefs_display_items.c index 39a056b7..5fcb2d6f 100644 --- a/src/prefs_display_items.c +++ b/src/prefs_display_items.c @@ -106,7 +106,8 @@ PrefsDisplayItemsDialog *prefs_display_items_dialog_create(void) window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_container_set_border_width(GTK_CONTAINER(window), 8); - gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER); + gtk_window_set_position(GTK_WINDOW(window), + GTK_WIN_POS_CENTER_ON_PARENT); gtk_window_set_modal(GTK_WINDOW(window), TRUE); gtk_window_set_policy(GTK_WINDOW(window), FALSE, FALSE, FALSE); gtk_window_set_title(GTK_WINDOW(window), _("Display items setting")); @@ -253,6 +254,7 @@ PrefsDisplayItemsDialog *prefs_display_items_dialog_create(void) G_CALLBACK(prefs_display_items_cancel), dialog); dialog->window = window; + dialog->label = label; dialog->stock_clist = stock_clist; dialog->shown_clist = shown_clist; dialog->add_btn = add_btn; @@ -268,8 +270,6 @@ PrefsDisplayItemsDialog *prefs_display_items_dialog_create(void) manage_window_set_transient(GTK_WINDOW(dialog->window)); gtk_widget_grab_focus(dialog->ok_btn); - gtk_widget_show(dialog->window); - dialog->finished = FALSE; dialog->cancelled = FALSE; diff --git a/src/prefs_display_items.h b/src/prefs_display_items.h index 352df414..c02ccf41 100644 --- a/src/prefs_display_items.h +++ b/src/prefs_display_items.h @@ -39,6 +39,8 @@ struct _PrefsDisplayItemsDialog { GtkWidget *window; + GtkWidget *label; + GtkWidget *stock_clist; GtkWidget *shown_clist; diff --git a/src/prefs_summary_column.c b/src/prefs_summary_column.c index 080cae36..a15e9285 100644 --- a/src/prefs_summary_column.c +++ b/src/prefs_summary_column.c @@ -173,7 +173,8 @@ static void prefs_summary_column_create(void) window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_container_set_border_width(GTK_CONTAINER(window), 8); - gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER); + gtk_window_set_position(GTK_WINDOW(window), + GTK_WIN_POS_CENTER_ON_PARENT); gtk_window_set_modal(GTK_WINDOW(window), TRUE); gtk_window_set_policy(GTK_WINDOW(window), FALSE, FALSE, FALSE); gtk_window_set_title(GTK_WINDOW(window), diff --git a/src/prefs_toolbar.c b/src/prefs_toolbar.c index cb8c16b6..4ddaff2d 100644 --- a/src/prefs_toolbar.c +++ b/src/prefs_toolbar.c @@ -25,6 +25,8 @@ #include <glib.h> #include <glib/gi18n.h> +#include <gtk/gtkwindow.h> +#include <gtk/gtklabel.h> #include "prefs_toolbar.h" #include "prefs_display_items.h" @@ -134,6 +136,11 @@ gint prefs_toolbar_open(ToolbarType type, gint *visible_items, gint ret = 0; dialog = prefs_display_items_dialog_create(); + gtk_window_set_title(GTK_WINDOW(dialog->window), + _("Customize toolbar")); + gtk_label_set_text(GTK_LABEL(dialog->label), + _("Select items to be displayed on the toolbar. You can modify\n" + "the order by using the Up / Down button, or dragging the items.")); switch (type) { case TOOLBAR_MAIN: @@ -153,6 +160,8 @@ gint prefs_toolbar_open(ToolbarType type, gint *visible_items, prefs_display_items_dialog_set_visible(dialog, visible_items); + gtk_widget_show(dialog->window); + while (dialog->finished == FALSE) gtk_main_iteration(); |