Fix #314: Remote commands for thumbnail maintenance
[geeqie.git] / src / ui_menu.c
index 39dafbf..9e0505c 100644 (file)
@@ -1,13 +1,22 @@
 /*
- * (SLIK) SimpLIstic sKin functions
- * (C) 2004 John Ellis
- * Copyright (C) 2008 - 2010 The Geeqie Team
+ * Copyright (C) 2004 John Ellis
+ * Copyright (C) 2008 - 2016 The Geeqie Team
  *
  * Author: John Ellis
  *
- * This software is released under the GNU General Public License (GNU GPL).
- * Please read the included file COPYING for more information.
- * This software comes with no warranty of any kind, use at your own risk!
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
 #ifdef HAVE_CONFIG_H
@@ -109,7 +118,7 @@ GtkWidget *menu_item_add_radio(GtkWidget *menu, const gchar *label, gpointer ite
 
 void menu_item_add_divider(GtkWidget *menu)
 {
-       GtkWidget *item = gtk_menu_item_new();
+       GtkWidget *item = gtk_separator_menu_item_new();
        gtk_widget_set_sensitive(item, FALSE);
        gtk_menu_shell_append(GTK_MENU_SHELL(menu),item);
        gtk_widget_show(item);
@@ -162,9 +171,11 @@ gboolean popup_menu_position_clamp(GtkMenu *menu, gint *x, gint *y, gint height)
        gboolean adjusted = FALSE;
        gint w, h;
        gint xw, xh;
+       GtkRequisition requisition;
 
-       w = GTK_WIDGET(menu)->requisition.width;
-       h = GTK_WIDGET(menu)->requisition.height;
+       gtk_widget_get_requisition(GTK_WIDGET(menu), &requisition);
+       w = requisition.width;
+       h = requisition.height;
        xw = gdk_screen_width();
        xh = gdk_screen_height();