[Xfce4-commits] <xfce4-panel:devel> Some more internal locking checks.
Nick Schermer
noreply at xfce.org
Sat Jan 30 14:38:01 CET 2010
Updating branch refs/heads/devel
to c0d0eb00f9fbbfd7834a0016481fbadd89670f9e (commit)
from a4966aeab79b5cd1e58b50f5f27365a926370f65 (commit)
commit c0d0eb00f9fbbfd7834a0016481fbadd89670f9e
Author: Nick Schermer <nick at xfce.org>
Date: Sat Jan 30 14:35:52 2010 +0100
Some more internal locking checks.
libxfce4panel/xfce-panel-plugin.c | 3 ++-
panel/panel-application.c | 8 ++++++++
panel/panel-preferences-dialog.c | 4 ++++
3 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/libxfce4panel/xfce-panel-plugin.c b/libxfce4panel/xfce-panel-plugin.c
index 332a608..a27da25 100644
--- a/libxfce4panel/xfce-panel-plugin.c
+++ b/libxfce4panel/xfce-panel-plugin.c
@@ -1249,7 +1249,8 @@ xfce_panel_plugin_removed (XfcePanelPluginProvider *provider)
{
panel_return_if_fail (XFCE_IS_PANEL_PLUGIN (provider));
- g_signal_emit (G_OBJECT (provider), plugin_signals[REMOVED], 0);
+ if (!xfce_panel_plugin_get_locked (XFCE_PANEL_PLUGIN (provider)))
+ g_signal_emit (G_OBJECT (provider), plugin_signals[REMOVED], 0);
}
diff --git a/panel/panel-application.c b/panel/panel-application.c
index 9dd4929..4ac0236 100644
--- a/panel/panel-application.c
+++ b/panel/panel-application.c
@@ -648,11 +648,19 @@ panel_application_window_destroyed (GtkWidget *window,
panel_return_if_fail (PANEL_IS_APPLICATION (application));
panel_return_if_fail (g_slist_find (application->windows, window) != NULL);
+ /* leave if the application is locked */
+ if (panel_application_get_locked (application))
+ return;
+
/* we need to update the bindings of all the panels... */
for (li = application->windows, n = 0; li != NULL; li = lnext, n++)
{
lnext = li->next;
+ /* TODO, this might go wrong when only 1 window is locked */
+ if (panel_window_get_locked (li->data))
+ continue;
+
if (passed_destroyed_window)
{
/* save this panel again at it's new position */
diff --git a/panel/panel-preferences-dialog.c b/panel/panel-preferences-dialog.c
index 621d96a..cc9f1c2 100644
--- a/panel/panel-preferences-dialog.c
+++ b/panel/panel-preferences-dialog.c
@@ -655,6 +655,10 @@ panel_preferences_dialog_panel_remove (GtkWidget *widget,
GObject *combo;
GtkWidget *toplevel;
+ /* leave if the window is locked */
+ if (panel_window_get_locked (dialog->active))
+ return;
+
/* get active panel */
nth = panel_application_get_window_index (dialog->application, dialog->active);
More information about the Xfce4-commits
mailing list