Browse Source

Some recent work on the tasklist.

Adds internal support for group buttons. Working support
for the overflow menu when the buttons don't fit. Ctrl
click to access the panel menu on tasklist buttons. And
a lot of other stuff I can't remember.
upstream/xfce4-panel-4.10.1
Nick Schermer 12 years ago
parent
commit
ee04793db7
  1. 1
      common/panel-debug.h
  2. 5
      common/panel-private.h
  3. 9
      docs/README.gtkrc-2.0
  4. 1999
      plugins/tasklist/tasklist-widget.c
  5. 2
      plugins/tasklist/tasklist-widget.h
  6. 20
      plugins/tasklist/tasklist.c

1
common/panel-debug.h

@ -24,6 +24,7 @@
#define PANEL_DEBUG_DOMAIN_APPLICATION "application"
#define PANEL_DEBUG_DOMAIN_EXTERNAL "external"
#define PANEL_DEBUG_DOMAIN_EXTERNAL46 "external46"
#define PANEL_DEBUG_DOMAIN_TASKLIST "tasklist"
#define PANEL_DEBUG_BOOL(bool) ((bool) ? "true" : "false")

5
common/panel-private.h

@ -64,6 +64,11 @@
* without asking the user what to do */
#define PANEL_PLUGIN_AUTO_RESTART (60)
/* integer swap functions */
#define SWAP_INTEGER(a,b) G_STMT_START { gint swp = a; a = b; b = swp; } G_STMT_END
#define TRANSPOSE_AREA(area) G_STMT_START { SWAP_INTEGER (area.width, area.height); \
SWAP_INTEGER (area.x, area.y); } G_STMT_END
/* quick GList and GSList counting without traversing */
#define LIST_HAS_ONE_ENTRY(l) ((l) != NULL && (l)->next == NULL)
#define LIST_HAS_ONE_OR_NO_ENTRIES(l) ((l) == NULL || (l)->next == NULL)

9
docs/README.gtkrc-2.0

@ -36,6 +36,9 @@ Special widget name in this plugin is showdesktop-button.
XfceTasklist
------------
You can set a custom icon size in gtk-icon-sizes with the name
panel-tasklist-menu. The default icon size is 16px.
style "xfce-tasklist-style"
{
# The maximum length of a button before the label ellipsizes.
@ -48,12 +51,16 @@ style "xfce-tasklist-style"
# rows will be possible.
XfceTasklist::max-button-size = 20
# Ellipsizing used in the task list button label.
# Ellipsizing used in the task list and overflow menu labels.
XfceTasklist::ellipsize-mode = PANGO_ELLIPSIZE_END
# Lucency of minimized icons. Valid values are between 0 (completely
# hide the icon) and 100 (don't lighten the icon).
XfceTasklist::minimized-icon-lucency = 50
# Maximum number of characters in the menu label before it will
# be ellipsized.
XfceTasklist::menu-max-width-chars = 24
}
class "XfceTasklist" style "xfce-tasklist-style"

1999
plugins/tasklist/tasklist-widget.c

File diff suppressed because it is too large

2
plugins/tasklist/tasklist-widget.h

@ -25,8 +25,6 @@ G_BEGIN_DECLS
typedef struct _XfceTasklistClass XfceTasklistClass;
typedef struct _XfceTasklist XfceTasklist;
typedef struct _XfceTasklistChild XfceTasklistChild;
typedef enum _XfceTasklistStyle XfceTasklistStyle;
typedef enum _XfceTasklistGrouping XfceTasklistGrouping;
typedef enum _XfceTasklistSortOrder XfceTasklistSortOrder;

20
plugins/tasklist/tasklist.c

@ -59,11 +59,15 @@ struct _TasklistPlugin
static void tasklist_plugin_construct (XfcePanelPlugin *panel_plugin);
static void tasklist_plugin_orientation_changed (XfcePanelPlugin *panel_plugin, GtkOrientation orientation);
static gboolean tasklist_plugin_size_changed (XfcePanelPlugin *panel_plugin, gint size);
static void tasklist_plugin_configure_plugin (XfcePanelPlugin *panel_plugin);
static gboolean tasklist_plugin_handle_expose_event (GtkWidget *widget, GdkEventExpose *event, TasklistPlugin *plugin);
static void tasklist_plugin_construct (XfcePanelPlugin *panel_plugin);
static void tasklist_plugin_orientation_changed (XfcePanelPlugin *panel_plugin,
GtkOrientation orientation);
static gboolean tasklist_plugin_size_changed (XfcePanelPlugin *panel_plugin,
gint size);
static void tasklist_plugin_configure_plugin (XfcePanelPlugin *panel_plugin);
static gboolean tasklist_plugin_handle_expose_event (GtkWidget *widget,
GdkEventExpose *event,
TasklistPlugin *plugin);
@ -212,6 +216,12 @@ tasklist_plugin_configure_plugin (XfcePanelPlugin *panel_plugin)
TASKLIST_DIALOG_BIND ("show-handle", "active")
TASKLIST_DIALOG_BIND ("sort-order", "active")
#ifndef GDK_WINDOWING_X11
/* not functional in x11, so avoid confusion */
object = gtk_builder_get_object (builder, "show-wireframes");
gtk_widget_hide (GTK_WIDGET (object));
#endif
gtk_widget_show (GTK_WIDGET (dialog));
}

Loading…
Cancel
Save