ayttm-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ayttm-commits] CVS: ayttm/src prefs_window.c,1.6,1.7 status.c,1.68,1.69


From: Colin Leroy <address@hidden>
Subject: [Ayttm-commits] CVS: ayttm/src prefs_window.c,1.6,1.7 status.c,1.68,1.69
Date: Sat, 22 Mar 2003 19:19:33 -0500

Update of /cvsroot/ayttm/ayttm/src
In directory subversions:/tmp/cvs-serv25327/src

Modified Files:
        prefs_window.c status.c 
Log Message:
remember window position


Index: prefs_window.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/prefs_window.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- prefs_window.c      22 Mar 2003 23:52:39 -0000      1.6
+++ prefs_window.c      23 Mar 2003 00:19:31 -0000      1.7
@@ -390,6 +390,8 @@
     eb_debug (DBG_CORE, "length_contact_window=%d\n", 
iGetLocalPref("length_contact_window"));
     fprintf(fp,"length_contact_window=%d\n", 
iGetLocalPref("length_contact_window"));
     fprintf(fp,"width_contact_window=%d\n", 
iGetLocalPref("width_contact_window"));
+    fprintf(fp,"x_contact_window=%d\n", iGetLocalPref("x_contact_window"));
+    fprintf(fp,"y_contact_window=%d\n", iGetLocalPref("y_contact_window"));
     fprintf(fp,"status_show_level=%d\n", iGetLocalPref("status_show_level"));
 #ifdef HAVE_ISPELL
     fprintf(fp,"do_spell_checking=%d\n", do_spell_checking) ;

Index: status.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/status.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -r1.68 -r1.69
--- status.c    22 Mar 2003 23:52:39 -0000      1.68
+++ status.c    23 Mar 2003 00:19:31 -0000      1.69
@@ -95,7 +95,7 @@
 static int status_show = -1;
 
 static time_t last_sound_played = 0;
-
+static void eb_save_size( GtkWidget * widget, gpointer data );
 
 void focus_statuswindow (void) 
 {
@@ -114,10 +114,11 @@
                node = node->next;
        }
        
+       eb_save_size(contact_window, NULL);
+
        userrc = g_strconcat(config_dir, G_DIR_SEPARATOR_S, "menurc", NULL);
        gtk_item_factory_dump_rc(userrc, NULL, TRUE);
        g_free(userrc);
-
        gtk_main_quit();
 }
 
@@ -248,11 +249,15 @@
 {
        int h = widget->allocation.height;
        int w = widget->allocation.width;
+       int x, y;
        
        if (h<10 || w < 10) 
                return;
        iSetLocalPref("length_contact_window",h);
        iSetLocalPref("width_contact_window",w);
+       gtkut_widget_get_uposition(statuswindow, &x, &y);
+       iSetLocalPref("x_contact_window",x);
+       iSetLocalPref("y_contact_window",y);
        iSetLocalPref("status_show_level",status_show);
        printf("saving window size\n");
        write_prefs();
@@ -1845,6 +1850,12 @@
                gtk_window_set_position(GTK_WINDOW(statuswindow), 
GTK_WIN_POS_NONE); 
                gtk_widget_set_uposition(statuswindow, win_x, win_y);
                gtk_widget_set_usize(statuswindow, win_w, win_h);
+       } else {
+               if (iGetLocalPref("x_contact_window") 
+               &&  iGetLocalPref("y_contact_window"))
+                       gtk_widget_set_uposition(statuswindow, 
+                                       iGetLocalPref("x_contact_window"),
+                                       iGetLocalPref("y_contact_window"));
        }
 #endif
        statusbox = gtk_vbox_new(FALSE, 0);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]