diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ChangeLog.ja | 5 | ||||
-rw-r--r-- | libsylph/prefs_common.c | 2 | ||||
-rw-r--r-- | libsylph/prefs_common.h | 3 | ||||
-rw-r--r-- | src/addressbook.c | 26 |
5 files changed, 35 insertions, 6 deletions
@@ -1,5 +1,10 @@ 2006-01-31 + * libsylph/prefs_common.[ch] + src/addressbook.c: the size of address book is now remembered. + +2006-01-31 + * src/mainwindow.c: added 'Mark thread as read' menu. * src/summaryview.c: summary_mark_thread_as_read(): fixed leaks of GtkTreePath list. diff --git a/ChangeLog.ja b/ChangeLog.ja index 5ca08aba..985c8e12 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,5 +1,10 @@ 2006-01-31 + * libsylph/prefs_common.[ch] + src/addressbook.c: アドレス帳のサイズを記憶するようにした。 + +2006-01-31 + * src/mainwindow.c: 「スレッドを読んだことにする」メニューを追加。 * src/summaryview.c: summary_mark_thread_as_read(): GtkTreePath の リストのリークを修正。 diff --git a/libsylph/prefs_common.c b/libsylph/prefs_common.c index 0f430afd..1d5f64eb 100644 --- a/libsylph/prefs_common.c +++ b/libsylph/prefs_common.c @@ -218,6 +218,8 @@ static PrefParam param[] = { {"compose_y", "32", &prefs_common.compose_y, P_INT}, {"compose_width", "600", &prefs_common.compose_width, P_INT}, {"compose_height", "560", &prefs_common.compose_height, P_INT}, + {"addressbook_width", "620", &prefs_common.addressbook_width, P_INT}, + {"addressbook_height", "360", &prefs_common.addressbook_height, P_INT}, /* Message */ {"enable_color", "TRUE", &prefs_common.enable_color, P_BOOL}, diff --git a/libsylph/prefs_common.h b/libsylph/prefs_common.h index af484a89..d94cd431 100644 --- a/libsylph/prefs_common.h +++ b/libsylph/prefs_common.h @@ -157,6 +157,9 @@ struct _PrefsCommon gint compose_width; gint compose_height; + gint addressbook_width; + gint addressbook_height; + /* Message */ gboolean enable_color; gint quote_level1_col; diff --git a/src/addressbook.c b/src/addressbook.c index 7a421f44..a3de83f2 100644 --- a/src/addressbook.c +++ b/src/addressbook.c @@ -1,6 +1,6 @@ /* * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client - * Copyright (C) 1999-2005 Hiroyuki Yamamoto + * Copyright (C) 1999-2006 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 @@ -104,8 +104,6 @@ typedef enum #define COL_ADDRESS_WIDTH 156 #define COL_FOLDER_WIDTH 170 -#define ADDRESSBOOK_WIDTH 640 -#define ADDRESSBOOK_HEIGHT 360 #define ADDRESSBOOK_MSGBUF_SIZE 2048 @@ -294,6 +292,10 @@ static GtkCTreeNode *addressbook_find_group_node (GtkCTreeNode *parent, static gboolean key_pressed (GtkWidget *widget, GdkEventKey *event, gpointer data); +static void size_allocated (GtkWidget *widget, + GtkAllocation *allocation, + gpointer data); + static gint addressbook_list_compare_func (GtkCList *clist, gconstpointer ptr1, gconstpointer ptr2); @@ -494,16 +496,18 @@ static void addressbook_create(void) window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window), _("Address book")); - gtk_widget_set_size_request - (window, ADDRESSBOOK_WIDTH, ADDRESSBOOK_HEIGHT); - gtk_window_set_policy(GTK_WINDOW(window), TRUE, TRUE, TRUE); gtk_window_set_wmclass(GTK_WINDOW(window), "addressbook", "Sylpheed"); + gtk_window_set_policy(GTK_WINDOW(window), TRUE, TRUE, TRUE); + gtk_widget_set_size_request(window, prefs_common.addressbook_width, + prefs_common.addressbook_height); gtk_widget_realize(window); g_signal_connect(G_OBJECT(window), "delete_event", G_CALLBACK(addressbook_close), NULL); g_signal_connect(G_OBJECT(window), "key_press_event", G_CALLBACK(key_pressed), NULL); + g_signal_connect(G_OBJECT(window), "size_allocate", + G_CALLBACK(size_allocated), NULL); MANAGE_WINDOW_SIGNALS_CONNECT(window); vbox = gtk_vbox_new(FALSE, 0); @@ -2764,6 +2768,16 @@ static gboolean key_pressed(GtkWidget *widget, GdkEventKey *event, return FALSE; } +static void size_allocated(GtkWidget *widget, GtkAllocation *allocation, + gpointer data) +{ + if (allocation->width <= 1 || allocation->height <= 1) + return; + + prefs_common.addressbook_width = allocation->width; + prefs_common.addressbook_height = allocation->height; +} + /* * Comparsion using names of AddressItem objects. */ |