! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
pre gtk 2.6 code removal and plugin configure fix
Status:
RESOLVED: FIXED
Product:
Xfce4-panel

Comments

Description Jani Monoses 2006-01-20 13:55:53 CET
-minor cleanup since at least gtk 2.6 is supported
-since the plugin configure function is used with g_idle_add it should
return FALSE. With current svn code when adding any new plugin it starts
calling the configure window repeatedly for about 5 seconds then the
whole session freezes.



Reproducible: Always
Steps to Reproduce:
1. 
2. 
3.
Comment 1 Jani Monoses 2006-01-20 13:57:28 CET
Index: plugins/launcher/launcher.c
===================================================================
--- plugins/launcher/launcher.c	(revision 19378)
+++ plugins/launcher/launcher.c	(working copy)
@@ -441,12 +441,6 @@
     gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (launcher->arrowbutton), 
                                   FALSE);
     launcher->from_timeout = FALSE;
-
-    /* 'fix' button depressed state for gtk 2.4 */
-    if (gtk_major_version == 2 && gtk_minor_version == 4)
-    {
-        gtk_button_released (GTK_BUTTON (launcher->iconbutton));
-    }
 }
 
 static gboolean
Index: plugins/testplugin/testplugin.c
===================================================================
--- plugins/testplugin/testplugin.c	(revision 19378)
+++ plugins/testplugin/testplugin.c	(working copy)
@@ -26,13 +26,9 @@
 test_orientation_changed (XfcePanelPlugin *plugin, GtkOrientation orientation, 
                      GtkWidget *label)
 {
-    if ((gtk_major_version == 2 && gtk_minor_version >= 6) || 
-         gtk_major_version > 2)
-    {
-        gdouble angle = (orientation == GTK_ORIENTATION_HORIZONTAL) ? 0 : 90;
+    gdouble angle = (orientation == GTK_ORIENTATION_HORIZONTAL) ? 0 : 90;
 
-        g_object_set (G_OBJECT (label), "angle", angle, NULL);
-    }
+    g_object_set (G_OBJECT (label), "angle", angle, NULL);
 }
 
 static void 
@@ -121,16 +117,12 @@
     gtk_widget_show (button);
     gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
     
-    if ((gtk_major_version == 2 && gtk_minor_version >= 6) || 
-         gtk_major_version > 2)
-    {
-        GtkOrientation orientation = 
-            xfce_panel_plugin_get_orientation (plugin);
-        gdouble angle = (orientation == GTK_ORIENTATION_HORIZONTAL) ? 0 : 90;
+    GtkOrientation orientation = 
+        xfce_panel_plugin_get_orientation (plugin);
+    gdouble angle = (orientation == GTK_ORIENTATION_HORIZONTAL) ? 0 : 90;
 
-        g_object_set (G_OBJECT (GTK_BIN (button)->child), 
-                      "angle", angle, NULL);
-    }
+    g_object_set (G_OBJECT (GTK_BIN (button)->child), 
+                 "angle", angle, NULL);
     
     gtk_container_add (GTK_CONTAINER (plugin), button);
 



Index: libxfce4panel/xfce-panel-item-iface.c
===================================================================
--- libxfce4panel/xfce-panel-item-iface.c	(revision 19378)
+++ libxfce4panel/xfce-panel-item-iface.c	(working copy)
@@ -402,9 +402,10 @@
  *
  * Ask @item to open a settings dialog.
  **/
-void xfce_panel_item_configure (XfcePanelItem *item)
+gboolean xfce_panel_item_configure (XfcePanelItem *item)
 {
     XFCE_PANEL_ITEM_GET_INTERFACE (item)->configure (item);
+    return FALSE;

  
Index: libxfce4panel/xfce-panel-item-iface.h
===================================================================
--- libxfce4panel/xfce-panel-item-iface.h	(revision 19378)
+++ libxfce4panel/xfce-panel-item-iface.h	(working copy)
@@ -112,7 +112,7 @@
 
 void xfce_panel_item_remove (XfcePanelItem *item);
 
-void xfce_panel_item_configure (XfcePanelItem *item);
+gboolean xfce_panel_item_configure (XfcePanelItem *item);
 
 
 G_END_DECLS
Comment 2 Jasper Huijsmans editbugs 2006-01-21 20:01:23 CET
Committed in slightly altered form: I used gtk_label_set_angle(). Thanks.
Comment 3 Jani Monoses 2006-01-21 20:34:33 CET
the second part of the patch does not seem to be committed :)
Comment 4 Jasper Huijsmans editbugs 2006-01-22 08:11:46 CET
(In reply to comment #3)
> the second part of the patch does not seem to be committed :)

Oh, yeah, I didn't want to change the library API, so I cahnged panel-dialogs.c
to use this:

static gboolean
item_configure_timeout (XfcePanelItem *item)
{
    xfce_panel_item_configure (item);

    return FALSE;
}

That should have the same effect.

Bug #1334

Reported by:
Jani Monoses
Reported on: 2006-01-20
Last modified on: 2010-11-20

People

Assignee:
Nick Schermer
CC List:
0 users

Version

Attachments

Additional information