all repos — tint2 @ d584d04691dd5442f665f809bef3ed48671a5943

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

Remove global variables from header files

git-svn-id: http://tint2.googlecode.com/svn/trunk@671 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
o9000 o9000
commit

d584d04691dd5442f665f809bef3ed48671a5943

parent

1a3ba2124560c273410975a28160622266d679a5

7 files changed, 21 insertions(+), 21 deletions(-)

jump to
M CMakeLists.txtCMakeLists.txt

@@ -128,7 +128,7 @@ target_link_libraries( tint2 m )

add_dependencies( tint2 version ) set_target_properties( tint2 PROPERTIES COMPILE_FLAGS "-Wall -pthread" ) -set_target_properties(tint2 PROPERTIES LINK_FLAGS "-pthread" ) +set_target_properties( tint2 PROPERTIES LINK_FLAGS "-pthread" ) install( TARGETS tint2 DESTINATION bin ) install( FILES sample/tint2rc DESTINATION ${SYSCONFDIR}/xdg/tint2 )
M src/config.csrc/config.c

@@ -35,6 +35,10 @@ #include <pango/pangocairo.h>

#include <pango/pangoxft.h> #include <Imlib2.h> +#include "config.h" + +#ifndef TINT2CONF + #include "common.h" #include "server.h" #include "panel.h"

@@ -44,7 +48,6 @@ #include "taskbarname.h"

#include "systraybar.h" #include "launcher.h" #include "clock.h" -#include "config.h" #include "window.h" #include "tooltip.h" #include "timer.h"

@@ -53,9 +56,13 @@ #ifdef ENABLE_BATTERY

#include "battery.h" #endif +#endif + // global path char *config_path; char *snapshot_path; + +#ifndef TINT2CONF // -------------------------------------------------- // backward compatibility

@@ -780,5 +787,5 @@

return 1; } - +#endif
M src/server.csrc/server.c

@@ -28,8 +28,9 @@ #include <unistd.h>

#include "server.h" #include "config.h" -#include "task.h" #include "window.h" + +Server_global server; void server_catch_error (Display *d, XErrorEvent *ev){}

@@ -350,6 +351,10 @@ server.monitor[0].names = 0;

} } +int server_get_number_of_desktop () +{ + return get_property32(server.root_win, server.atom._NET_NUMBER_OF_DESKTOPS, XA_CARDINAL); +} void get_desktops() {
M src/server.hsrc/server.h

@@ -130,7 +130,7 @@ #endif // HAVE_SN

} Server_global; -Server_global server; +extern Server_global server; // freed memory
M src/tint.csrc/tint.c

@@ -128,19 +128,14 @@

#ifdef HAVE_SN static int error_trap_depth = 0; -static void -error_trap_push (SnDisplay *display, - Display *xdisplay) +static void error_trap_push(SnDisplay *display, Display *xdisplay) { ++error_trap_depth; } -static void -error_trap_pop (SnDisplay *display, - Display *xdisplay) +static void error_trap_pop(SnDisplay *display, Display *xdisplay) { - if (error_trap_depth == 0) - { + if (error_trap_depth == 0) { fprintf(stderr, "Error trap underflow!\n"); return; }

@@ -157,8 +152,7 @@ SnLauncherContext *ctx;

ctx = (SnLauncherContext *) g_tree_lookup (server.pids, GINT_TO_POINTER (pid)); if (ctx == NULL) { fprintf(stderr, "Unknown child %d terminated!\n", pid); - } - else { + } else { g_tree_remove (server.pids, GINT_TO_POINTER (pid)); sn_launcher_context_complete (ctx); sn_launcher_context_unref (ctx);
M src/util/window.csrc/util/window.c

@@ -197,11 +197,6 @@ return 0;

} -int server_get_number_of_desktop () -{ - return get_property32(server.root_win, server.atom._NET_NUMBER_OF_DESKTOPS, XA_CARDINAL); -} - GSList *server_get_name_of_desktop () {
M src/util/window.hsrc/util/window.h

@@ -17,7 +17,6 @@ void set_active (Window win);

void set_desktop (int desktop); void set_close (Window win); int server_get_current_desktop (); -int server_get_number_of_desktop (); GSList *server_get_name_of_desktop (); int window_is_iconified (Window win); int window_is_urgent (Window win);