Commit 713cccc9 by Ruben Rodriguez

Fixed gnome panel indicator

parent f88d0595
# Fixes https://bugs.launchpad.net/indicator-applet/+bug/965953
diff --git indicator-applet/src/applet-main.c indicator-applet/src/applet-main.c
--- indicator-applet/src/applet-main.c
+++ indicator-applet/src/applet-main.c
@@ -362,6 +362,21 @@ accessible_desc_update (IndicatorObject
return;
}
+static gboolean
+do_menu_reposition(gpointer menu)
+{
+ gtk_widget_set_size_request(menu, -1, -1);
+ g_timeout_add(20, (GSourceFunc) gtk_menu_reposition, (gpointer) menu);
+ return 0;
+}
+
+static void
+on_menuitem_show (GtkMenuItem *menuitem, gpointer menu)
+{
+ gtk_widget_set_size_request(menu, -1, 500);
+ g_idle_add((GSourceFunc) do_menu_reposition, (gpointer) menu);
+}
+
static void
entry_added (IndicatorObject * io, IndicatorObjectEntry * entry, GtkWidget * menubar)
{
@@ -435,6 +450,7 @@ entry_added (IndicatorObject * io, Indic
if (entry->menu != NULL) {
gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), GTK_WIDGET(entry->menu));
+ g_signal_connect(G_OBJECT(menuitem), "activate", G_CALLBACK(on_menuitem_show), entry->menu);
}
place_in_menu(menubar, menuitem, io, entry);
......@@ -17,7 +17,7 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
VERSION=5
VERSION=6
. ./config
......@@ -64,6 +64,12 @@ pack-index=30
pack-type=start
toplevel-id=panel
[Object notification-area]
object-iid=NotificationAreaAppletFactory::NotificationArea
pack-index=30
pack-type=end
toplevel-id=panel
[Object indicators]
object-iid=IndicatorAppletFactory::IndicatorApplet
toplevel-id=panel
......
#!/bin/sh
#
# Copyright (C) 2012 Rubén Rodríguez <ruben@trisquel.info>
#
# 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 St, Fifth Floor, Boston, MA 02110-1301 USA
#
VERSION=1
. ./config
patch -p1 < $DATA/indicator-applet-scroll-arrows.patch
changelog "Fixes LP 965953"
compile
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment