# HG changeset patch # User Mark Doliner # Date 1133411705 0 # Node ID 234c25bc5d49d4f3af07d551027fbea86a528948 # Parent 25d7ef365dbf1460e7599dd50ef2411be3c7a984 [gaim-migrate @ 14583] sf patch #1367212, from Casey Harkins 1) don't save window size when the blist is maximized 2) save whether the blist is maximized committer: Tailor Script diff -r 25d7ef365dbf -r 234c25bc5d49 src/gtkblist.c --- a/src/gtkblist.c Thu Dec 01 01:01:26 2005 +0000 +++ b/src/gtkblist.c Thu Dec 01 04:35:05 2005 +0000 @@ -175,6 +175,13 @@ gaim_prefs_set_bool("/gaim/gtk/blist/list_visible", TRUE); } + if(event->changed_mask & GDK_WINDOW_STATE_MAXIMIZED) { + if(event->new_window_state & GDK_WINDOW_STATE_MAXIMIZED) + gaim_prefs_set_bool("/gaim/gtk/blist/list_maximized", TRUE); + else + gaim_prefs_set_bool("/gaim/gtk/blist/list_maximized", FALSE); + } + return FALSE; } @@ -223,6 +230,10 @@ return FALSE; /* carry on normally */ } + /* ignore changes when maximized */ + if(gaim_prefs_get_bool("/gaim/gtk/blist/list_maximized")) + return FALSE; + /* store the position */ gaim_prefs_set_int("/gaim/gtk/blist/x", x); gaim_prefs_set_int("/gaim/gtk/blist/y", y); @@ -3023,6 +3034,8 @@ /* ...and move it back. */ gtk_window_move(GTK_WINDOW(gtkblist->window), blist_x, blist_y); gtk_window_resize(GTK_WINDOW(gtkblist->window), blist_width, blist_height); + if (gaim_prefs_get_bool("/gaim/gtk/blist/list_maximized")) + gtk_window_maximize(GTK_WINDOW(gtkblist->window)); } } @@ -4913,6 +4926,7 @@ gaim_prefs_add_bool("/gaim/gtk/blist/show_empty_groups", FALSE); gaim_prefs_add_bool("/gaim/gtk/blist/show_offline_buddies", FALSE); gaim_prefs_add_bool("/gaim/gtk/blist/list_visible", TRUE); + gaim_prefs_add_bool("/gaim/gtk/blist/list_maximized", FALSE); gaim_prefs_add_string("/gaim/gtk/blist/sort_type", "alphabetical"); gaim_prefs_add_int("/gaim/gtk/blist/x", 0); gaim_prefs_add_int("/gaim/gtk/blist/y", 0);