From da881bdaac99a26615b4022044d6d18ba0428b0b Mon Sep 17 00:00:00 2001 From: hiro Date: Thu, 20 Jan 2005 08:47:36 +0000 Subject: restored the resize grip of the main statusbar. git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@23 ee746299-78ed-0310-b773-934348b2243d --- ChangeLog | 9 +++++++++ ChangeLog.ja | 9 +++++++++ src/folderview.c | 2 +- src/mainwindow.c | 41 +++++++++++++++++++++++------------------ src/mainwindow.h | 3 +-- src/setup.c | 2 +- src/statusbar.c | 3 +-- src/statusbar.h | 2 +- src/summaryview.c | 2 +- 9 files changed, 47 insertions(+), 26 deletions(-) diff --git a/ChangeLog b/ChangeLog index 586af984..23bc9c36 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2005-01-20 + + * src/statusbar.c + src/summaryview.c + src/setup.c + src/folderview.c + src/mainwindow.[ch]: restored the resize grip of the main + statusbar with its proper position (thanks to Yoichi Imai). + 2005-01-20 * src/jpilot.c: fixed Japanese code conversion. diff --git a/ChangeLog.ja b/ChangeLog.ja index f09392d4..c6e33efe 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,3 +1,12 @@ +2005-01-20 + + * src/statusbar.c + src/summaryview.c + src/setup.c + src/folderview.c + src/mainwindow.[ch]: メインステータスバーのリサイズグリップを + 正しい位置にして復活(今井さん thanks)。 + 2005-01-20 * src/jpilot.c: 日本語文字コードの変換を修正。 diff --git a/src/folderview.c b/src/folderview.c index 56320c8f..b2b6210a 100644 --- a/src/folderview.c +++ b/src/folderview.c @@ -77,7 +77,7 @@ typedef enum { \ gtk_statusbar_push(GTK_STATUSBAR(mainwin->statusbar), \ mainwin->folderview_cid, str); \ - gtkut_widget_wait_for_draw(mainwin->hbox_stat); \ + gtkut_widget_wait_for_draw(mainwin->statusbar); \ } #define STATUSBAR_POP(mainwin) \ diff --git a/src/mainwindow.c b/src/mainwindow.c index 17563d66..e01cfc9e 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -1,6 +1,6 @@ /* * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client - * Copyright (C) 1999-2004 Hiroyuki Yamamoto + * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -86,7 +86,7 @@ { \ gtk_statusbar_push(GTK_STATUSBAR(mainwin->statusbar), \ mainwin->mainwin_cid, str); \ - gtkut_widget_wait_for_draw(mainwin->hbox_stat); \ + gtkut_widget_wait_for_draw(mainwin->statusbar); \ } #define STATUSBAR_POP(mainwin) \ @@ -751,7 +751,6 @@ MainWindow *main_window_create(SeparateType type) GtkWidget *menubar; GtkWidget *handlebox; GtkWidget *vbox_body; - GtkWidget *hbox_stat; GtkWidget *statusbar; GtkWidget *progressbar; GtkWidget *statuslabel; @@ -760,6 +759,7 @@ MainWindow *main_window_create(SeparateType type) GtkWidget *online_pixmap; GtkWidget *offline_pixmap; GtkTooltips *online_tip; + GtkWidget *spacer_hbox; GtkWidget *ac_button; GtkWidget *ac_label; @@ -773,6 +773,8 @@ MainWindow *main_window_create(SeparateType type) GtkItemFactory *ifactory; GtkWidget *ac_menu; GtkWidget *menuitem; + gint w; + gint h; gint i; static GdkGeometry geometry; @@ -826,23 +828,20 @@ MainWindow *main_window_create(SeparateType type) gtk_container_set_border_width(GTK_CONTAINER(vbox_body), BORDER_WIDTH); gtk_box_pack_start(GTK_BOX(vbox), vbox_body, TRUE, TRUE, 0); - hbox_stat = gtk_hbox_new(FALSE, 2); - gtk_box_pack_end(GTK_BOX(vbox_body), hbox_stat, FALSE, FALSE, 0); - statusbar = statusbar_create(); - gtk_box_pack_start(GTK_BOX(hbox_stat), statusbar, TRUE, TRUE, 0); + gtk_box_pack_end(GTK_BOX(vbox_body), statusbar, FALSE, FALSE, 0); progressbar = gtk_progress_bar_new(); gtk_widget_set_size_request(progressbar, 120, 1); - gtk_box_pack_start(GTK_BOX(hbox_stat), progressbar, FALSE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(statusbar), progressbar, FALSE, FALSE, 0); statuslabel = gtk_label_new(""); - gtk_box_pack_start(GTK_BOX(hbox_stat), statuslabel, FALSE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(statusbar), statuslabel, FALSE, FALSE, 0); online_hbox = gtk_hbox_new(FALSE, 0); - online_pixmap = stock_pixmap_widget(hbox_stat, STOCK_PIXMAP_ONLINE); - offline_pixmap = stock_pixmap_widget(hbox_stat, STOCK_PIXMAP_OFFLINE); + online_pixmap = stock_pixmap_widget(statusbar, STOCK_PIXMAP_ONLINE); + offline_pixmap = stock_pixmap_widget(statusbar, STOCK_PIXMAP_OFFLINE); gtk_box_pack_start(GTK_BOX(online_hbox), online_pixmap, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(online_hbox), offline_pixmap, @@ -854,22 +853,25 @@ MainWindow *main_window_create(SeparateType type) gtk_container_add(GTK_CONTAINER(online_switch), online_hbox); g_signal_connect(G_OBJECT(online_switch), "clicked", G_CALLBACK(online_switch_clicked), mainwin); - gtk_box_pack_start(GTK_BOX(hbox_stat), online_switch, FALSE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(statusbar), online_switch, FALSE, FALSE, 0); online_tip = gtk_tooltips_new(); + spacer_hbox = gtk_hbox_new(FALSE, 0); + gtk_box_pack_end(GTK_BOX(statusbar), spacer_hbox, FALSE, FALSE, 0); + ac_button = gtk_button_new(); gtk_button_set_relief(GTK_BUTTON(ac_button), GTK_RELIEF_NONE); GTK_WIDGET_UNSET_FLAGS(ac_button, GTK_CAN_FOCUS); gtk_widget_set_size_request(ac_button, -1, 1); - gtk_box_pack_end(GTK_BOX(hbox_stat), ac_button, FALSE, FALSE, 0); + gtk_box_pack_end(GTK_BOX(statusbar), ac_button, FALSE, FALSE, 0); g_signal_connect(G_OBJECT(ac_button), "button_press_event", G_CALLBACK(ac_label_button_pressed), mainwin); ac_label = gtk_label_new(""); gtk_container_add(GTK_CONTAINER(ac_button), ac_label); - gtk_widget_show_all(hbox_stat); + gtk_widget_show_all(statusbar); /* create views */ mainwin->folderview = folderview = folderview_create(); @@ -894,7 +896,6 @@ MainWindow *main_window_create(SeparateType type) mainwin->menu_factory = ifactory; mainwin->handlebox = handlebox; mainwin->vbox_body = vbox_body; - mainwin->hbox_stat = hbox_stat; mainwin->statusbar = statusbar; mainwin->progressbar = progressbar; mainwin->statuslabel = statuslabel; @@ -972,7 +973,7 @@ MainWindow *main_window_create(SeparateType type) } gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem), TRUE); - gtk_widget_hide(mainwin->hbox_stat); + gtk_widget_hide(mainwin->statusbar); menuitem = gtk_item_factory_get_item (ifactory, "/View/Show or hide/Status bar"); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem), @@ -997,6 +998,10 @@ MainWindow *main_window_create(SeparateType type) /* show main window */ gtk_widget_show(mainwin->window); + gdk_drawable_get_size + (GDK_DRAWABLE(GTK_STATUSBAR(statusbar)->grip_window), &w, &h); + gtk_widget_set_size_request(spacer_hbox, w, -1); + /* initialize views */ folderview_init(folderview); summary_init(summaryview); @@ -2696,10 +2701,10 @@ static void toggle_statusbar_cb(MainWindow *mainwin, guint action, GtkWidget *widget) { if (GTK_CHECK_MENU_ITEM(widget)->active) { - gtk_widget_show(mainwin->hbox_stat); + gtk_widget_show(mainwin->statusbar); prefs_common.show_statusbar = TRUE; } else { - gtk_widget_hide(mainwin->hbox_stat); + gtk_widget_hide(mainwin->statusbar); prefs_common.show_statusbar = FALSE; } } diff --git a/src/mainwindow.h b/src/mainwindow.h index 2993f0ce..283ee1ce 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -1,6 +1,6 @@ /* * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client - * Copyright (C) 1999-2004 Hiroyuki Yamamoto + * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -100,7 +100,6 @@ struct _MainWindow /* body */ GtkWidget *vbox_body; - GtkWidget *hbox_stat; GtkWidget *statusbar; GtkWidget *progressbar; GtkWidget *statuslabel; diff --git a/src/setup.c b/src/setup.c index ef4ba94e..fe2316f1 100644 --- a/src/setup.c +++ b/src/setup.c @@ -88,7 +88,7 @@ static void scan_tree_func(Folder *folder, FolderItem *item, gpointer data) gtk_statusbar_push(GTK_STATUSBAR(mainwin->statusbar), mainwin->mainwin_cid, str); - gtkut_widget_wait_for_draw(mainwin->hbox_stat); + gtkut_widget_wait_for_draw(mainwin->statusbar); gtk_statusbar_pop(GTK_STATUSBAR(mainwin->statusbar), mainwin->mainwin_cid); g_free(str); diff --git a/src/statusbar.c b/src/statusbar.c index f255aa61..63bdd8e0 100644 --- a/src/statusbar.c +++ b/src/statusbar.c @@ -1,6 +1,6 @@ /* * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client - * Copyright (C) 1999,2000 Hiroyuki Yamamoto + * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -40,7 +40,6 @@ GtkWidget *statusbar_create(void) statusbar = gtk_statusbar_new(); gtk_widget_set_size_request(statusbar, 1, -1); - gtk_statusbar_set_has_resize_grip(GTK_STATUSBAR(statusbar), FALSE); statusbar_list = g_list_append(statusbar_list, statusbar); return statusbar; diff --git a/src/statusbar.h b/src/statusbar.h index 991b672b..e84a46a4 100644 --- a/src/statusbar.h +++ b/src/statusbar.h @@ -1,6 +1,6 @@ /* * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client - * Copyright (C) 1999,2000 Hiroyuki Yamamoto + * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/summaryview.c b/src/summaryview.c index d66ba5bd..fb006d83 100644 --- a/src/summaryview.c +++ b/src/summaryview.c @@ -77,7 +77,7 @@ { \ gtk_statusbar_push(GTK_STATUSBAR(mainwin->statusbar), \ mainwin->summaryview_cid, str); \ - gtkut_widget_wait_for_draw(mainwin->hbox_stat); \ + gtkut_widget_wait_for_draw(mainwin->statusbar); \ } #define STATUSBAR_POP(mainwin) \ -- cgit v1.2.3