emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/src/gtkutil.c


From: Jan Djärv
Subject: [Emacs-diffs] Changes to emacs/src/gtkutil.c
Date: Sat, 08 Jan 2005 12:29:52 -0500

Index: emacs/src/gtkutil.c
diff -c emacs/src/gtkutil.c:1.58 emacs/src/gtkutil.c:1.59
*** emacs/src/gtkutil.c:1.58    Fri Jan  7 16:59:57 2005
--- emacs/src/gtkutil.c Sat Jan  8 16:49:14 2005
***************
*** 756,762 ****
       So we cheat a bit by setting a height that is what it will have
       later on when tool bar items are added.  */
    if (FRAME_EXTERNAL_TOOL_BAR (f) && f->n_tool_bar_items == 0)
!     FRAME_TOOLBAR_HEIGHT (f) = 34;
  
  
    /* We don't want this widget double buffered, because we draw on it
--- 756,762 ----
       So we cheat a bit by setting a height that is what it will have
       later on when tool bar items are added.  */
    if (FRAME_EXTERNAL_TOOL_BAR (f) && f->n_tool_bar_items == 0)
!     FRAME_TOOLBAR_HEIGHT (f) = 38;
  
  
    /* We don't want this widget double buffered, because we draw on it
***************
*** 3156,3161 ****
--- 3156,3163 ----
  
    if (f)
      {
+       FRAME_X_OUTPUT (f)->toolbar_detached = 1;
+ 
        /* When detaching a tool bar, not everything dissapear.  There are
           a few pixels left that are used to drop the tool bar back into
           place.  */
***************
*** 3187,3197 ****
      {
        GtkRequisition req;
  
        gtk_widget_size_request (w, &req);
        FRAME_TOOLBAR_HEIGHT (f) = req.height;
  
        /* The height has changed, resize outer widget and set columns
!          rows to what we had before detaching the tool bar.  */
        xg_resize_outer_widget (f, FRAME_COLS (f), FRAME_LINES (f));
      }
  }
--- 3189,3201 ----
      {
        GtkRequisition req;
  
+       FRAME_X_OUTPUT (f)->toolbar_detached = 0;
+ 
        gtk_widget_size_request (w, &req);
        FRAME_TOOLBAR_HEIGHT (f) = req.height;
  
        /* The height has changed, resize outer widget and set columns
!          rows to what we had before attaching the tool bar.  */
        xg_resize_outer_widget (f, FRAME_COLS (f), FRAME_LINES (f));
      }
  }
***************
*** 3305,3310 ****
--- 3309,3316 ----
  
    x->toolbar_widget = gtk_toolbar_new ();
    x->handlebox_widget = gtk_handle_box_new ();
+   x->toolbar_detached = 0;
+ 
    gtk_container_add (GTK_CONTAINER (x->handlebox_widget),
                       x->toolbar_widget);
  
***************
*** 3537,3543 ****
      }
  
    gtk_widget_size_request (x->toolbar_widget, &new_req);
!   if (old_req.height != new_req.height)
      {
        FRAME_TOOLBAR_HEIGHT (f) = new_req.height;
        xg_resize_outer_widget (f, FRAME_COLS (f), FRAME_LINES (f));
--- 3543,3550 ----
      }
  
    gtk_widget_size_request (x->toolbar_widget, &new_req);
!   if (old_req.height != new_req.height
!       && ! FRAME_X_OUTPUT (f)->toolbar_detached)
      {
        FRAME_TOOLBAR_HEIGHT (f) = new_req.height;
        xg_resize_outer_widget (f, FRAME_COLS (f), FRAME_LINES (f));




reply via email to

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