gnumeric r16948 - in trunk: . src
- From: mortenw svn gnome org
- To: svn-commits-list gnome org
- Subject: gnumeric r16948 - in trunk: . src
- Date: Tue, 4 Nov 2008 14:53:22 +0000 (UTC)
Author: mortenw
Date: Tue Nov 4 14:53:22 2008
New Revision: 16948
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16948&view=rev
Log:
2008-11-04 Morten Welinder <terra gnome org>
* src/wbc-gtk.c (toolbar_context_menu): Deal with the
non-handle-bar case. Patch from Hib Eris, #559249.
Modified:
trunk/ChangeLog
trunk/NEWS
trunk/src/wbc-gtk.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Tue Nov 4 14:53:22 2008
@@ -7,6 +7,9 @@
* Permit lexicographic sorting by sheet names in the manage sheets
dialog [#527076]
+Hib Eris:
+ * Fix problems with toolbars when no handle bar present. [#559249]
+
Jody:
* Display top-left when selecting a rel ref to a merged region.
Modified: trunk/src/wbc-gtk.c
==============================================================================
--- trunk/src/wbc-gtk.c (original)
+++ trunk/src/wbc-gtk.c Tue Nov 4 14:53:22 2008
@@ -3086,18 +3086,18 @@
}
static void
-cb_tcm_hide (GtkWidget *widget, GtkHandleBox *hdlbox)
+cb_tcm_hide (GtkWidget *widget, GtkWidget *box)
{
- if (hdlbox->child_detached)
- cb_tcm_reattach (widget, hdlbox);
- gtk_widget_hide (GTK_WIDGET (hdlbox));
+ if (GTK_IS_HANDLE_BOX (box) && GTK_HANDLE_BOX (box)->child_detached)
+ cb_tcm_reattach (widget, GTK_HANDLE_BOX (box));
+ gtk_widget_hide (box);
}
static void
toolbar_context_menu (GtkToolbar *tb, WBCGtk *gtk, GdkEventButton *event_button)
{
- GtkHandleBox *hdlbox = GTK_HANDLE_BOX (GTK_WIDGET (tb)->parent);
- GtkWidget *zone = GTK_WIDGET (hdlbox)->parent;
+ GtkWidget *box = GTK_WIDGET (tb)->parent;
+ GtkWidget *zone = GTK_WIDGET (box)->parent;
GtkWidget *menu = gtk_menu_new ();
GtkWidget *item;
@@ -3110,12 +3110,12 @@
{ N_("Display to the right of sheets"), GTK_POS_RIGHT }
};
- if (hdlbox->child_detached) {
+ if (GTK_IS_HANDLE_BOX (box) && GTK_HANDLE_BOX (box)->child_detached) {
item = gtk_menu_item_new_with_label (_("Reattach to main window"));
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
g_signal_connect (G_OBJECT (item), "activate",
G_CALLBACK (cb_tcm_reattach),
- hdlbox);
+ box);
} else {
size_t ui;
GSList *group = NULL;
@@ -3147,7 +3147,7 @@
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
g_signal_connect (G_OBJECT (item), "activate",
G_CALLBACK (cb_tcm_hide),
- hdlbox);
+ box);
gtk_widget_show_all (menu);
gnumeric_popup_menu (GTK_MENU (menu), event_button);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]