Bugfixes, bugfixes



Attached is a bugfix for #4805:

Please add to CVS.

MBG

-- 
     Matthew Guenther
     mguenthe@netcom.ca                        Nothing is but what is not.
     http://www.netcom.ca/~mguenthe/
=== cd /home/mguenthe/src/balsa/src/
=== cvs diff -c balsa-index-page.c main-window.c main.c mblist-window.c pref-manager.c save-restore.c

Index: balsa-index-page.c
===================================================================
RCS file: /cvs/gnome/balsa/src/balsa-index-page.c,v
retrieving revision 1.20
diff -c -r1.20 balsa-index-page.c
*** balsa-index-page.c	2000/03/24 09:28:53	1.20
--- balsa-index-page.c	2000/03/28 03:12:39
***************
*** 330,337 ****
  }
  
  /* PKGW: you'd think this function would be a good idea. 
! We assume that we've been detached from the notebook.
! */
  void balsa_index_page_close_and_destroy( GtkObject *obj )
  {
    BalsaIndexPage *page;
--- 330,337 ----
  }
  
  /* PKGW: you'd think this function would be a good idea. 
!  * We assume that we've been detached from the notebook.
!  */
  void balsa_index_page_close_and_destroy( GtkObject *obj )
  {
    BalsaIndexPage *page;
***************
*** 385,394 ****
    }
    if (bmsg) {
      if (BALSA_MESSAGE(bmsg)) {
!       if (message) 
!         balsa_message_set(BALSA_MESSAGE(bmsg), message);
!       else
!         balsa_message_clear (BALSA_MESSAGE (bmsg));
      }
    }
    
--- 385,396 ----
    }
    if (bmsg) {
      if (BALSA_MESSAGE(bmsg)) {
!       if(balsa_app.previewpane) {
!         if (message) 
!           balsa_message_set(BALSA_MESSAGE(bmsg), message);
!         else
!           balsa_message_clear (BALSA_MESSAGE (bmsg));
!       }
      }
    }
    
Index: main-window.c
===================================================================
RCS file: /cvs/gnome/balsa/src/main-window.c,v
retrieving revision 1.260
diff -c -r1.260 main-window.c
*** main-window.c	2000/03/27 08:08:05	1.260
--- main-window.c	2000/03/28 03:12:40
***************
*** 550,557 ****
    
    gtk_paned_pack1(GTK_PANED(vpaned), window->notebook, TRUE, TRUE);
    gtk_paned_pack2(GTK_PANED(vpaned), preview, TRUE, TRUE);
    /*PKGW: do it this way, without the usizes.*/
!   gtk_paned_set_position( GTK_PANED(vpaned), balsa_app.notebook_height );
  
    gtk_widget_show(vpaned);
    gtk_widget_show(hpaned);
--- 550,562 ----
    
    gtk_paned_pack1(GTK_PANED(vpaned), window->notebook, TRUE, TRUE);
    gtk_paned_pack2(GTK_PANED(vpaned), preview, TRUE, TRUE);
+ 
    /*PKGW: do it this way, without the usizes.*/
!   if (balsa_app.previewpane)
!     gtk_paned_set_position( GTK_PANED(vpaned), balsa_app.notebook_height );
!   else
!     /* Set it to something really high */
!     gtk_paned_set_position ( GTK_PANED (vpaned), G_MAXINT);  
  
    gtk_widget_show(vpaned);
    gtk_widget_show(hpaned);
***************
*** 790,799 ****
   * refresh data in the main window
   */
  void
! balsa_window_refresh(BalsaWindow *window)
  {
    GnomeDockItem *item;
    GtkWidget *toolbar;
    static BalsaWindow *balsa_window = NULL;
  
    if (window == NULL)
--- 795,808 ----
   * refresh data in the main window
   */
  void
! balsa_window_refresh (BalsaWindow *window)
  {
    GnomeDockItem *item;
    GtkWidget *toolbar;
+   GtkWidget *index;
+   BalsaMessage *bmsg;
+   GtkWidget *paned;
+   
    static BalsaWindow *balsa_window = NULL;
  
    if (window == NULL)
***************
*** 804,817 ****
    else
      balsa_window = window;
    
    /*
     * set the toolbar style
     */
!   item = gnome_app_get_dock_item_by_name(GNOME_APP(balsa_window),
! 					 GNOME_APP_TOOLBAR_NAME);
!   toolbar = gnome_dock_item_get_child(item);
  
!   gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), balsa_app.toolbar_style);
  
    /* I don't know if this is a bug of gtk or not but if this is not here
       it doesn't properly resize after a toolbar style change */
--- 813,843 ----
    else
      balsa_window = window;
    
+   index = balsa_window_find_current_index (balsa_window);
+   if (index) {
+     paned = GTK_WIDGET (balsa_app.notebook)->parent;
+ 
+     if (balsa_app.previewpane) {
+       balsa_index_redraw_current (BALSA_INDEX (index));
+       gtk_paned_set_position (GTK_PANED (paned), balsa_app.notebook_height);
+     } else {
+       bmsg = BALSA_MESSAGE (BALSA_WINDOW (balsa_window)->preview);
+       if (bmsg)
+         balsa_message_clear (bmsg);
+       /* Set the height to something really big (those new hi-res
+          screens and all :) */
+       gtk_paned_set_position (GTK_PANED (paned), G_MAXINT);
+     }
+   }
+   
    /*
     * set the toolbar style
     */
!   item = gnome_app_get_dock_item_by_name (GNOME_APP(balsa_window),
!                                           GNOME_APP_TOOLBAR_NAME);
!   toolbar = gnome_dock_item_get_child (item);
  
!   gtk_toolbar_set_style (GTK_TOOLBAR(toolbar), balsa_app.toolbar_style);
  
    /* I don't know if this is a bug of gtk or not but if this is not here
       it doesn't properly resize after a toolbar style change */
***************
*** 845,851 ****
  
    about = gnome_about_new ("Balsa",
  			   BALSA_VERSION,
! 			   _ ("Copyright (C) 1997-1999"),
  			   authors,
  			   _ ("The Balsa email client is part of the GNOME desktop environment.  Information on Balsa can be found at http://www.balsa.net/\n\nIf you need to report bugs, please do so at: http://bugs.gnome.org/"),
  			   "balsa/balsa_logo.png");
--- 871,877 ----
  
    about = gnome_about_new ("Balsa",
  			   BALSA_VERSION,
! 			   _ ("Copyright (C) 1997-2000"),
  			   authors,
  			   _ ("The Balsa email client is part of the GNOME desktop environment.  Information on Balsa can be found at http://www.balsa.net/\n\nIf you need to report bugs, please do so at: http://bugs.gnome.org/"),
  			   "balsa/balsa_logo.png");
***************
*** 1356,1362 ****
     balsa_app.browse_wrap = GTK_CHECK_MENU_ITEM(widget)->active;
  
     /* redisplay current message? */
!    index =(BalsaIndex*)balsa_window_find_current_index(BALSA_WINDOW (data));
     if(index) 
        balsa_index_redraw_current (index);
  }
--- 1382,1388 ----
     balsa_app.browse_wrap = GTK_CHECK_MENU_ITEM(widget)->active;
  
     /* redisplay current message? */
!    index = BALSA_INDEX (balsa_window_find_current_index(BALSA_WINDOW (data)));
     if(index) 
        balsa_index_redraw_current (index);
  }
***************
*** 1581,1586 ****
--- 1607,1613 ----
  /* PKGW: remember when they change the position of the vpaned. */
  static void notebook_size_alloc_cb( GtkWidget *notebook, GtkAllocation *alloc )
  {
+   if (balsa_app.previewpane)
      balsa_app.notebook_height = alloc->height;
  }
  
Index: main.c
===================================================================
RCS file: /cvs/gnome/balsa/src/main.c,v
retrieving revision 1.66
diff -c -r1.66 main.c
*** main.c	2000/03/26 14:59:31	1.66
--- main.c	2000/03/28 03:12:40
***************
*** 300,305 ****
--- 300,306 ----
    /* TODO: select the first one, if any is open */ 
    if(gtk_notebook_get_current_page( GTK_NOTEBOOK(balsa_app.notebook) ) >=0 ) 
       gtk_notebook_set_page( GTK_NOTEBOOK(balsa_app.notebook), 0);
+ 
    gtk_main();
  
  #ifdef BALSA_USE_THREADS
Index: mblist-window.c
===================================================================
RCS file: /cvs/gnome/balsa/src/mblist-window.c,v
retrieving revision 1.101
diff -c -r1.101 mblist-window.c
*** mblist-window.c	2000/03/26 14:59:31	1.101
--- mblist-window.c	2000/03/28 03:12:40
***************
*** 307,313 ****
  static void size_allocate_cb( GtkWidget *widget, GtkAllocation *alloc )
  {
  /*    printf( "size_allocate_cb()\n" ); */
!     balsa_app.mblist_width = alloc->width;
  }
  
  static void
--- 307,314 ----
  static void size_allocate_cb( GtkWidget *widget, GtkAllocation *alloc )
  {
  /*    printf( "size_allocate_cb()\n" ); */
!   if (balsa_app.show_mblist)
!     balsa_app.mblist_width = alloc->width + 18;
  }
  
  static void
Index: pref-manager.c
===================================================================
RCS file: /cvs/gnome/balsa/src/pref-manager.c,v
retrieving revision 1.101
diff -c -r1.101 pref-manager.c
*** pref-manager.c	2000/03/24 09:28:53	1.101
--- pref-manager.c	2000/03/28 03:12:41
***************
*** 483,488 ****
--- 483,489 ----
  	 */
  	config_global_save ();
          balsa_mblist_redraw (balsa_app.mblist);
+         balsa_window_refresh (BALSA_WINDOW (GTK_WIDGET (pbox)->parent));
  }
  
  
***************
*** 1434,1439 ****
--- 1435,1441 ----
          /* mblist unread colour  */
          color_frame = gtk_frame_new (_("Colours"));
          gtk_widget_show (GTK_WIDGET (color_frame));
+         gtk_container_set_border_width (GTK_CONTAINER (color_frame), 5);
  	gtk_box_pack_start (GTK_BOX (vbox9), color_frame, FALSE, FALSE, 0);
  
          unread_color_table = gtk_table_new (2, 1, FALSE);
Index: save-restore.c
===================================================================
RCS file: /cvs/gnome/balsa/src/save-restore.c,v
retrieving revision 1.119
diff -c -r1.119 save-restore.c
*** save-restore.c	2000/03/18 22:16:09	1.119
--- save-restore.c	2000/03/28 03:12:42
***************
*** 1042,1048 ****
  /* We need to add 18 to the mailbox list width to prevent it from changing
     after the exit (not sure why but possibly because of difference between
     paned width and the ctree width. */
!     snprintf (tmp, sizeof (tmp), "%d", balsa_app.mblist_width + 18);
      pl_dict_add_str_str (globals, "MailboxListWidth", tmp);
  
      snprintf (tmp, sizeof (tmp), "%d", balsa_app.notebook_height);
--- 1042,1048 ----
  /* We need to add 18 to the mailbox list width to prevent it from changing
     after the exit (not sure why but possibly because of difference between
     paned width and the ctree width. */
!     snprintf (tmp, sizeof (tmp), "%d", balsa_app.mblist_width);
      pl_dict_add_str_str (globals, "MailboxListWidth", tmp);
  
      snprintf (tmp, sizeof (tmp), "%d", balsa_app.notebook_height);
=== Exit status: 1

PGP signature



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