[Xfce4-commits] <xfce4-panel:master> Panel: Fix panel loading in kiosk mode.
Nick Schermer
noreply at xfce.org
Sat Apr 16 18:50:02 CEST 2011
Updating branch refs/heads/master
to c73ee1552f05be85a636d5f3b330425c97292aec (commit)
from 64243bb8388429a284bf74653fa1f2f1c1f03d70 (commit)
commit c73ee1552f05be85a636d5f3b330425c97292aec
Author: Nick Schermer <nick at xfce.org>
Date: Sat Apr 16 18:48:50 2011 +0200
Panel: Fix panel loading in kiosk mode.
panel/panel-application.c | 30 +++++++++++++++---------------
1 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/panel/panel-application.c b/panel/panel-application.c
index fdf4a27..03a6004 100644
--- a/panel/panel-application.c
+++ b/panel/panel-application.c
@@ -344,7 +344,6 @@ panel_application_load (PanelApplication *application)
if (array == NULL)
continue;
- /* walk the array in pairs of two */
for (j = 0; j < array->len; j++)
{
/* get the plugin id */
@@ -635,10 +634,6 @@ panel_application_plugin_insert (PanelApplication *application,
panel_return_val_if_fail (PANEL_IS_WINDOW (window), FALSE);
panel_return_val_if_fail (name != NULL, FALSE);
- /* leave if the window is locked */
- if (panel_window_get_locked (window))
- return FALSE;
-
/* create a new panel plugin */
provider = panel_module_factory_new_plugin (application->factory, name,
gtk_window_get_screen (GTK_WINDOW (window)),
@@ -824,16 +819,13 @@ panel_application_drag_data_received (PanelWindow *window,
panel_return_if_fail (GDK_IS_DRAG_CONTEXT (context));
panel_return_if_fail (PANEL_IS_ITEMBAR (itembar));
- /* we don't allow any kind of drops here when the panel is locked */
- if (panel_window_get_locked (window))
- {
- gdk_drag_status (context, 0, drag_time);
- return;
- }
-
- /* get the application */
application = panel_application_get ();
+ /* we don't allow any kind of drops here when the panel is locked */
+ if (panel_application_get_locked (application)
+ || panel_window_get_locked (window))
+ goto invalid_drag;
+
if (!application->drop_data_ready)
{
panel_assert (!application->drop_desktop_files);
@@ -945,6 +937,7 @@ panel_application_drag_data_received (PanelWindow *window,
}
else
{
+ invalid_drag:
gdk_drag_status (context, 0, drag_time);
}
@@ -1229,6 +1222,10 @@ panel_application_add_new_item (PanelApplication *application,
panel_return_if_fail (plugin_name != NULL);
panel_return_if_fail (g_slist_length (application->windows) > 0);
+ /* leave if the config is locked */
+ if (panel_application_get_locked (application))
+ return;
+
if (panel_module_factory_has_module (application->factory, plugin_name))
{
/* find a suitable window if there are 2 or more windows */
@@ -1251,8 +1248,11 @@ panel_application_add_new_item (PanelApplication *application,
/* add the plugin to the end of the choosen window */
window = g_slist_nth_data (application->windows, nth);
- panel_application_plugin_insert (application, window,
- plugin_name, -1, arguments, -1);
+ if (!panel_window_get_locked (window))
+ {
+ panel_application_plugin_insert (application, window,
+ plugin_name, -1, arguments, -1);
+ }
}
else
{
More information about the Xfce4-commits
mailing list