[Xfce4-commits] <xfce4-taskbar-plugin:master> Minor plugin tweaks and updated makefile pipeline
Gearoid Murphy
noreply at xfce.org
Sat Oct 13 16:00:01 CEST 2012
Updating branch refs/heads/master
to aa7b850f8ef45a0879bec62f50933f02a9841613 (commit)
from f0249629886d40abf9f0b713870e3a86cbf4ae92 (commit)
commit aa7b850f8ef45a0879bec62f50933f02a9841613
Author: Gearoid Murphy <gearoid at murphy.com>
Date: Sat Oct 13 14:59:06 2012 +0100
Minor plugin tweaks and updated makefile pipeline
Makefile | 11 ++++++++---
taskbar-widget.c | 28 +++++++++++-----------------
2 files changed, 19 insertions(+), 20 deletions(-)
diff --git a/Makefile b/Makefile
index 7b35fea..b8fc69c 100644
--- a/Makefile
+++ b/Makefile
@@ -4,9 +4,14 @@ LINKFLAGS=`pkg-config --libs gtk+-2.0 exo-1 libwnck-1.0 libxfce4panel-1.0 libxfc
OBJ=taskbar.o taskbar-widget.o hotkeys.o
-all:libtaskbar
+all:libtaskbar.so
-libtaskbar:$(OBJ)
+taskbar-dialog_ui.h:taskbar-dialog.glade
+ python convertGladeToC.py
+
+taskbar.o:taskbar-dialog_ui.h
+
+libtaskbar.so:$(OBJ)
g++ -shared -o libtaskbar.so $(OBJ) $(LINKFLAGS)
install:
@@ -26,4 +31,4 @@ devenv:
restart:
xfce4-panel -r
-
\ No newline at end of file
+
diff --git a/taskbar-widget.c b/taskbar-widget.c
index 05230bb..75d0cfc 100644
--- a/taskbar-widget.c
+++ b/taskbar-widget.c
@@ -946,17 +946,17 @@ static void xfce_taskbar_gdk_screen_changed (GdkScreen *gdk_screen, XfceTaskBar
static void xfce_taskbar_active_window_changed (WnckScreen *screen, WnckWindow *previous_window, XfceTaskBar *taskbar)
{
WnckWindow *active_window;
- GList *li;
XfceTaskBarGroup *group;
-
+ GList *li;
+
panel_return_if_fail (WNCK_IS_SCREEN (screen));
panel_return_if_fail (previous_window == NULL || WNCK_IS_WINDOW (previous_window));
panel_return_if_fail (XFCE_IS_taskbar (taskbar));
panel_return_if_fail (taskbar->screen == screen);
-
+
// get the new active window
active_window = wnck_screen_get_active_window (screen);
-
+
// lock the taskbar
xfce_taskbar_lock (taskbar);
@@ -967,16 +967,14 @@ static void xfce_taskbar_active_window_changed (WnckScreen *screen, WnckWindow *
group = li->data;
if (!GTK_WIDGET_VISIBLE (group->button))
+ {
continue ;
+ }
for(wi = group->wnodes; wi != NULL; wi = wi->next)
{
wnode = wi->data ;
- if (!(wnode->window == previous_window || wnode->window == active_window || !taskbar->all_workspaces))
- {
- continue;
- }
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (group->button), !!(wnode->window == active_window));
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (group->button), (gboolean)(wnode->window == active_window));
}
}
@@ -1494,7 +1492,7 @@ static void xfce_taskbar_button_workspace_changed (WnckWindow *window, XfceTaskB
panel_return_if_fail (XFCE_IS_taskbar (child->taskbar));
/* make sure we don't have two active windows (bug #6474) */
- //gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (child->button), FALSE);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (child->group->button), FALSE);
if (!taskbar->all_workspaces)
{
@@ -2219,15 +2217,11 @@ static void xfce_taskbar_group_button_menu_destroy(GtkWidget *menu, XfceTaskBarG
panel_return_if_fail (XFCE_IS_taskbar (group->taskbar));
panel_return_if_fail (GTK_IS_TOGGLE_BUTTON (group->button));
panel_return_if_fail (GTK_IS_WIDGET (menu));
-
gtk_widget_destroy (menu);
-
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (group->button), FALSE);
-
-#ifdef GDK_WINDOWING_X11
- /* make sure the wireframe is hidden */
+ #ifdef GDK_WINDOWING_X11
+ // Removes the wireframe associated with the currently selected window
xfce_taskbar_wireframe_hide (group->taskbar);
-#endif
+ #endif
}
More information about the Xfce4-commits
mailing list