[Xfce4-commits] [panel-plugins/xfce4-clipman-plugin] 01/01: Adjust menu geometry to fit all elements (Bug #12865)

noreply at xfce.org noreply at xfce.org
Sat Nov 5 22:28:01 CET 2016


This is an automated email from the git hooks/post-receive script.

ochosi pushed a commit to branch master
in repository panel-plugins/xfce4-clipman-plugin.

commit 21ea7680a0bc61b8a9e1bc2699b66e07c0000ae5
Author: Rinat <ibragimovrinat at mail.ru>
Date:   Sat Nov 5 22:26:43 2016 +0100

    Adjust menu geometry to fit all elements (Bug #12865)
---
 panel-plugin/menu.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/panel-plugin/menu.c b/panel-plugin/menu.c
index 94ecbbc..0f24fa7 100644
--- a/panel-plugin/menu.c
+++ b/panel-plugin/menu.c
@@ -271,6 +271,16 @@ cb_clear_history (ClipmanMenu *menu)
  */
 
 static void
+_clipman_menu_adjust_geometry (ClipmanMenu *menu)
+{
+  GtkAllocation allocation = {};
+
+  gtk_widget_get_preferred_width (GTK_WIDGET (menu), NULL, &allocation.width);
+  gtk_widget_get_preferred_height (GTK_WIDGET (menu), NULL, &allocation.height);
+  gtk_widget_size_allocate (GTK_WIDGET (menu), &allocation);
+}
+
+static void
 _clipman_menu_update_list (ClipmanMenu *menu)
 {
   GtkWidget *mi, *image;
@@ -382,6 +392,8 @@ G_GNUC_END_IGNORE_DEPRECATIONS
       /* Set the clear history item insensitive */
       gtk_widget_set_sensitive (menu->priv->mi_clear_history, FALSE);
     }
+
+  _clipman_menu_adjust_geometry(menu);
 }
 
 static void

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list