Compare commits
2 Commits
v0.12
...
area-align
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
92fa96b8c7 | ||
|
|
ca862025d6 |
1
AUTHORS
1
AUTHORS
@@ -5,7 +5,6 @@ tint2 is developped by :
|
||||
- Euan Freeman <euan04@gmail.com> (tintwizard)
|
||||
- Christian Ruppert <Spooky85@gmail.com> (autotools build system)
|
||||
- Ovidiu M <mrovi9000 at gmail.com> : launcher, bug fixes
|
||||
- Mishael A Sibiryakov (death@junki.org) : freespace
|
||||
|
||||
tint2 is based on ttm source code (http://code.google.com/p/ttm/)
|
||||
- 2007-2008 Pål Staurland <staura@gmail.com>
|
||||
|
||||
@@ -3,7 +3,7 @@ cmake_minimum_required( VERSION 2.6 )
|
||||
|
||||
option( ENABLE_BATTERY "Enable battery status plugin" ON )
|
||||
option( ENABLE_TINT2CONF "Enable tint2conf build, a GTK+2 theme configurator for tint2" ON )
|
||||
option( ENABLE_EXAMPLES "Install additional tin2rc examples" ON )
|
||||
option( ENABLE_EXAMPLES "Install additional tin2rc examples" OFF )
|
||||
option( ENABLE_RSVG "Rsvg support (launcher only)" ON )
|
||||
option( ENABLE_SN "Startup notification support" ON )
|
||||
option( ENABLE_ASAN "Build tint2 with AddressSanitizer" OFF )
|
||||
@@ -23,7 +23,7 @@ pkg_check_modules( SN libstartup-notification-1.0>=0.12 )
|
||||
find_library( RT_LIBRARY rt )
|
||||
|
||||
if( NOT X11_FOUND OR NOT PANGOCAIRO_FOUND OR NOT PANGO_FOUND OR NOT CAIRO_FOUND OR NOT GLIB2_FOUND OR NOT GOBJECT2_FOUND OR NOT IMLIB2_FOUND )
|
||||
message( FATAL_ERROR "Not all dependencies fulfilled. See https://gitlab.com/o9000/tint2/wikis/Install" )
|
||||
message( FATAL_ERROR "Not all dependencies fulfilled. See https://code.google.com/p/tint2/wiki/Install" )
|
||||
endif( NOT X11_FOUND OR NOT PANGOCAIRO_FOUND OR NOT PANGO_FOUND OR NOT CAIRO_FOUND OR NOT GLIB2_FOUND OR NOT GOBJECT2_FOUND OR NOT IMLIB2_FOUND )
|
||||
|
||||
string( REPLACE ";" " " FLAGS_REPLACED "${IMLIB2_LDFLAGS}" )
|
||||
@@ -33,8 +33,6 @@ if( NOT IMLIB_BUILD_WITH_X )
|
||||
message( FATAL_ERROR "Imlib is not built with X support" )
|
||||
endif( NOT IMLIB_BUILD_WITH_X )
|
||||
|
||||
add_definitions( -D_GNU_SOURCE )
|
||||
|
||||
include_directories( ${PROJECT_BINARY_DIR}
|
||||
src
|
||||
src/battery
|
||||
@@ -44,7 +42,6 @@ include_directories( ${PROJECT_BINARY_DIR}
|
||||
src/launcher
|
||||
src/tooltip
|
||||
src/util
|
||||
src/freespace
|
||||
${X11_INCLUDE_DIRS}
|
||||
${PANGOCAIRO_INCLUDE_DIRS}
|
||||
${PANGO_INCLUDE_DIRS}
|
||||
@@ -70,7 +67,6 @@ set( SOURCES src/config.c
|
||||
src/taskbar/taskbar.c
|
||||
src/taskbar/taskbarname.c
|
||||
src/tooltip/tooltip.c
|
||||
src/freespace/freespace.c
|
||||
src/util/area.c
|
||||
src/util/common.c
|
||||
src/util/strnatcmp.c
|
||||
@@ -158,5 +154,5 @@ install( FILES AUTHORS ChangeLog README.md DESTINATION ${DOCDIR} )
|
||||
install( FILES doc/tint2.1 DESTINATION ${MANDIR}/man1 )
|
||||
if( ENABLE_EXAMPLES )
|
||||
file( GLOB SAMPLEFILES sample/*.tint2rc )
|
||||
install( FILES ${SAMPLEFILES} DESTINATION ${DATADIR}/tint2 )
|
||||
install( FILES ${SAMPLEFILES} DESTINATION ${DOCDIR}/examples )
|
||||
endif( ENABLE_EXAMPLES )
|
||||
|
||||
43
ChangeLog
43
ChangeLog
@@ -1,11 +1,8 @@
|
||||
2015-07-12 master
|
||||
2015-05-03 master
|
||||
- Note: the changes listed here are based on the previous release tint2 0.11, however some distributions (e.g. Debian)
|
||||
offered packages using newer commits and/or patches; thus from the user's perspective some of these features are
|
||||
already present. They are marked with '(already released by distros)'.
|
||||
- Major changes:
|
||||
- Panel:
|
||||
- Checks if a compositor is launched during the first 30 seconds after startup and if found, restarts the panel with
|
||||
transparency enabled.
|
||||
- Launcher:
|
||||
- The launcher is now considered stable
|
||||
- Enhancement: SVG icon support
|
||||
@@ -14,10 +11,6 @@
|
||||
- Experimental, testing/feedback needed
|
||||
- Icons (system tray, task buttons, launcher):
|
||||
- Changed rendering method to fix icon corruptions (please report any problems)
|
||||
- System tray:
|
||||
- Icon rendering is faster
|
||||
- Several kinds of graphical corruptions have been fixed
|
||||
- Added workaround for misbehaving applications leaving empty tray icons
|
||||
- Many bugfixes
|
||||
- New config options (see https://gitlab.com/o9000/tint2/wikis/Configure):
|
||||
- Panel:
|
||||
@@ -30,7 +23,6 @@
|
||||
- taskbar_hide_inactive_tasks
|
||||
- taskbar_sort_order
|
||||
- taskbar_name (already released by distros)
|
||||
- task_align (already released by distros)
|
||||
- Launcher:
|
||||
- launcher* (already released by distros)
|
||||
- launcher_apps_dir (previously patched in by some distros)
|
||||
@@ -38,7 +30,6 @@
|
||||
- launcher_icon_theme_override
|
||||
- System tray:
|
||||
- systray_monitor
|
||||
- Freespace (already released by distros)
|
||||
- Config options with changed behavior:
|
||||
- Panel:
|
||||
- panel_dock: previously, 'panel_dock = 1' was actually not placing the panel into the dock. This option now
|
||||
@@ -53,40 +44,8 @@
|
||||
Reason for change: legibility improved for transparent panels.
|
||||
- Launcher:
|
||||
- launcher_item_app: now it expands leading ~ to the path to the user's home directory.
|
||||
- Known issues:
|
||||
- tint2 might close unexpectedly and/or cause X to freeze on certain ATI graphics cards.
|
||||
Workaround: set 'disable_transparency = 1' in the config.
|
||||
Reference: https://gitlab.com/o9000/tint2/issues/497
|
||||
- Project hosting:
|
||||
- Migrated from https://code.google.com/p/tint2 to https://gitlab.com/o9000/tint2 and switched from svn to git
|
||||
- Bugfixes:
|
||||
- task switching from tint2 using the mouse wheel (mouse_scroll_up = prev_task and mouse_scroll_down = next_task) with
|
||||
multiple desktops and taskbar_mode = multi_desktop when hovering over the first/last window in the taskbar was broken;
|
||||
also when a window is set to appear on all desktops;
|
||||
- the launcher was not loading an icon if the icon theme was not providing it in a size close to the value of launcher_icon_size;
|
||||
- the launcher was not loading an icon if the extension was incorrect (e.g. file contents were PNG but the file name
|
||||
had extension SVG);
|
||||
- some launcher icons (PNG files saved with an indexed colormap and alpha mask) were sometimes rendered with white instead of
|
||||
transparency;
|
||||
- icons looked washed out when the panel was very transparent;
|
||||
- the panel border was rendered in the background of every systray icon; sometimes systray icons were rendered in the
|
||||
background of other icons;
|
||||
- a crash caused by a change that prevents Google Chrome (and possibly other misbehaving applications) from leaving a large
|
||||
number of empty icons in the system tray;
|
||||
- a crash caused by the system tray code on computers with ATI cards;
|
||||
- the panel window had a shadow;
|
||||
- some ATI drivers return an extra monitor with size zero which should be ignored when using panel_monitor = all;
|
||||
- the battery applet was sometimes working incorrectly with certain laptop models (the battery applet stopped updating after
|
||||
suspend with the battery unplugged);
|
||||
- crashed caused by incomplete or malformed config files;
|
||||
- with the fvwm window manager, the window title was sometimes not displayed correctly if it changed right after an
|
||||
application was started;
|
||||
- seconds were not updating in the clock;
|
||||
- tint2 hang triggered when an application started from the launcher was closed and startup notifications were enabled;
|
||||
- tint2 may fail to process X events for a few seconds when a new icon is added to the system tray;
|
||||
- the code that loads SVG icons was using a lot of memory;
|
||||
- fixed occasional race at startup in detecting screen resolution changes;
|
||||
- modified timer code to prevent some rare double-frees or duplicate timers.
|
||||
|
||||
2010-06-26
|
||||
- unhide tint2 panel when dragging something
|
||||
|
||||
@@ -7,4 +7,5 @@ cmake -DCMAKE_INSTALL_PREFIX=/usr ../
|
||||
make
|
||||
sudo make install
|
||||
|
||||
To see additional options you can set at the 'cmake' step, run 'cmake -L ../'
|
||||
To see additional options you can do after the cmake step a 'cmake -L ../'
|
||||
|
||||
|
||||
18
README.md
18
README.md
@@ -1,14 +1,14 @@
|
||||
### New stable release: 0.12
|
||||
### New unstable release: 0.12-rc3
|
||||
Changes: https://gitlab.com/o9000/tint2/blob/master/ChangeLog
|
||||
|
||||
Documentation: https://gitlab.com/o9000/tint2/wikis/home
|
||||
|
||||
Try it out with (see also [dependencies](https://gitlab.com/o9000/tint2/wikis/Install#dependencies)):
|
||||
```
|
||||
mkdir tint2-0.12
|
||||
cd tint2-0.12
|
||||
wget 'https://gitlab.com/o9000/tint2/repository/archive.tar.gz?ref=v0.12' --output-document tint2-0.12.tar.gz
|
||||
tar -xzf tint2-0.12.tar.gz
|
||||
mkdir tint2-0.12-rc3
|
||||
cd tint2-0.12-rc3
|
||||
wget 'https://gitlab.com/o9000/tint2/repository/archive.tar.gz?ref=v0.12-rc3' --output-document tint2-0.12-rc3.tar.gz
|
||||
tar -xzf tint2-0.12-rc3.tar.gz
|
||||
cd tint2.git
|
||||
mkdir build
|
||||
cd build
|
||||
@@ -17,12 +17,6 @@ make -j4
|
||||
./tint2 &
|
||||
./src/tint2conf/tint2conf &
|
||||
```
|
||||
|
||||
To install from source, also run (as root):
|
||||
```
|
||||
make install
|
||||
```
|
||||
|
||||
Please report any problems to https://gitlab.com/o9000/tint2/issues. Your feedback is much appreciated.
|
||||
|
||||
P.S. GitLab is now the official location of the tint2 project, migrated from Google Code, which is shutting down. In case you are wondering why not GitHub, BitBucket etc., we chose GitLab because it is open source, it is mature and works well, looks cool and has a very nice team.
|
||||
@@ -55,7 +49,7 @@ tint2 is a simple panel/taskbar made for modern X window managers. It was specif
|
||||
* [Configure](https://gitlab.com/o9000/tint2/wikis/Configure)
|
||||
* [Add applet not supported by tint2](https://gitlab.com/o9000/tint2/wikis/ThirdPartyApplets)
|
||||
* [Other frequently asked questions](https://gitlab.com/o9000/tint2/wikis/FAQ)
|
||||
* [Debug](https://gitlab.com/o9000/tint2/wikis/Debug)
|
||||
* [Debug](https://gitlab.com/o9000/tint2/wikis/Debug)
|
||||
|
||||
### How can I help out?
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
DEPENDENCIES:
|
||||
cairo (with X support), pango, glib2, libX11, libXinerama, libXrandr, libXrender, libXcomposite, libXdamage, imlib2 (with X support)
|
||||
you might need -dev packages on Debian
|
||||
cairo (whit X support), pango, glib2, libX11, libXinerama, libXrandr, libXrender, libXcomposite, libXdamage imlib2 (with X support)
|
||||
you might need -dev packages on debian
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.\" First parameter, NAME, should be all caps
|
||||
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
||||
.\" other parameters are allowed: see man(7), man(1)
|
||||
.TH TINT2 1 "2015-07-05"
|
||||
.TH TINT2 1 "2009-01-17"
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.\"
|
||||
.\" Some roff macros, for reference:
|
||||
@@ -37,7 +37,7 @@ compliance with freedesktop specifications.
|
||||
.PP
|
||||
On the first startup tint2 creates a config file in $HOME/.config/tint2/tint2rc.
|
||||
.PP
|
||||
See the wiki page at https://gitlab.com/o9000/tint2/wikis/home for more information.
|
||||
See wiki page on http://code.google.com/p/tint2/wiki/Welcome for more information.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B \-c config-file
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
MAJOR=0.12
|
||||
DIRTY=""
|
||||
|
||||
git update-index -q --ignore-submodules --refresh
|
||||
@@ -30,8 +29,7 @@ then
|
||||
fi
|
||||
fi
|
||||
|
||||
VERSION=$(git describe --exact-match 2>/dev/null || echo "$MAJOR-git$(git show -s --pretty=format:%cI.%h | tr -d ':' | tr -d '-' | tr '.' '-' | sed 's/T[0-9\+]*//g')")$DIRTY
|
||||
VERSION=$(echo "$VERSION" | sed 's/^v//')
|
||||
VERSION=$(git describe --exact-match 2>/dev/null || echo "0.11-git$(git show -s --pretty=format:%cI.%h | tr -d ':' | tr -d '-' | tr '.' '-' | sed 's/T[0-9\+]*//g')")$DIRTY
|
||||
|
||||
echo '#define VERSION_STRING "'$VERSION'"' > version.h
|
||||
echo $VERSION
|
||||
|
||||
@@ -121,12 +121,8 @@ launcher_icon_size = 22
|
||||
launcher_icon_asb = 100 0 0
|
||||
startup_notifications = 1
|
||||
launcher_tooltip = 1
|
||||
launcher_item_app = /usr/share/applications/tint2conf.desktop
|
||||
launcher_item_app = /usr/local/share/applications/tint2conf.desktop
|
||||
launcher_item_app = /usr/share/applications/firefox.desktop
|
||||
launcher_item_app = /usr/share/applications/iceweasel.desktop
|
||||
launcher_item_app = /usr/share/applications/chromium-browser.desktop
|
||||
launcher_item_app = /usr/share/applications/google-chrome.desktop
|
||||
|
||||
#-------------------------------------
|
||||
# Clock
|
||||
|
||||
@@ -121,12 +121,8 @@ launcher_icon_size = 22
|
||||
launcher_icon_asb = 100 0 0
|
||||
startup_notifications = 1
|
||||
launcher_tooltip = 1
|
||||
launcher_item_app = /usr/share/applications/tint2conf.desktop
|
||||
launcher_item_app = /usr/local/share/applications/tint2conf.desktop
|
||||
launcher_item_app = /usr/share/applications/firefox.desktop
|
||||
launcher_item_app = /usr/share/applications/iceweasel.desktop
|
||||
launcher_item_app = /usr/share/applications/chromium-browser.desktop
|
||||
launcher_item_app = /usr/share/applications/google-chrome.desktop
|
||||
|
||||
#-------------------------------------
|
||||
# Clock
|
||||
|
||||
@@ -127,12 +127,8 @@ launcher_icon_size = 22
|
||||
launcher_icon_asb = 100 0 0
|
||||
startup_notifications = 1
|
||||
launcher_tooltip = 1
|
||||
launcher_item_app = /usr/share/applications/tint2conf.desktop
|
||||
launcher_item_app = /usr/local/share/applications/tint2conf.desktop
|
||||
launcher_item_app = /usr/share/applications/firefox.desktop
|
||||
launcher_item_app = /usr/share/applications/iceweasel.desktop
|
||||
launcher_item_app = /usr/share/applications/chromium-browser.desktop
|
||||
launcher_item_app = /usr/share/applications/google-chrome.desktop
|
||||
|
||||
#-------------------------------------
|
||||
# Clock
|
||||
|
||||
@@ -1,176 +0,0 @@
|
||||
#---- Generated by tint2conf e324 ----
|
||||
# See https://gitlab.com/o9000/tint2/wikis/Configure for
|
||||
# full documentation of the configuration options.
|
||||
#-------------------------------------
|
||||
# Backgrounds
|
||||
# Background 1
|
||||
rounded = 0
|
||||
border_width = 1
|
||||
background_color = #eeeeee 0
|
||||
border_color = #bbbbbb 10
|
||||
|
||||
# Background 2
|
||||
rounded = 5
|
||||
border_width = 0
|
||||
background_color = #eeeeee 4
|
||||
border_color = #cccccc 100
|
||||
|
||||
# Background 3
|
||||
rounded = 5
|
||||
border_width = 1
|
||||
background_color = #dddddd 4
|
||||
border_color = #999999 100
|
||||
|
||||
# Background 4
|
||||
rounded = 5
|
||||
border_width = 1
|
||||
background_color = #aa4400 100
|
||||
border_color = #aa7733 100
|
||||
|
||||
# Background 5
|
||||
rounded = 2
|
||||
border_width = 1
|
||||
background_color = #ffffaa 100
|
||||
border_color = #999999 100
|
||||
|
||||
# Background 6
|
||||
rounded = 2
|
||||
border_width = 1
|
||||
background_color = #eeeeee 4
|
||||
border_color = #cccccc 100
|
||||
|
||||
# Background 7
|
||||
rounded = 2
|
||||
border_width = 1
|
||||
background_color = #dddddd 3
|
||||
border_color = #999999 100
|
||||
|
||||
# Background 8
|
||||
rounded = 3
|
||||
border_width = 0
|
||||
background_color = #999999 4
|
||||
border_color = #cccccc 100
|
||||
|
||||
#-------------------------------------
|
||||
# Panel
|
||||
panel_items = LTSC
|
||||
panel_size = 100% 32
|
||||
panel_margin = 0 0
|
||||
panel_padding = 4 2 4
|
||||
panel_background_id = 1
|
||||
wm_menu = 1
|
||||
panel_dock = 0
|
||||
panel_position = bottom center horizontal
|
||||
panel_layer = normal
|
||||
panel_monitor = all
|
||||
autohide = 0
|
||||
autohide_show_timeout = 0
|
||||
autohide_hide_timeout = 0.5
|
||||
autohide_height = 2
|
||||
strut_policy = follow_size
|
||||
panel_window_name = tint2
|
||||
disable_transparency = 0
|
||||
font_shadow = 0
|
||||
|
||||
#-------------------------------------
|
||||
# Taskbar
|
||||
taskbar_mode = single_desktop
|
||||
taskbar_padding = 0 0 2
|
||||
taskbar_background_id = 0
|
||||
taskbar_active_background_id = 0
|
||||
taskbar_name = 1
|
||||
taskbar_hide_inactive_tasks = 0
|
||||
taskbar_hide_different_monitor = 0
|
||||
taskbar_name_padding = 6 3
|
||||
taskbar_name_background_id = 6
|
||||
taskbar_name_active_background_id = 7
|
||||
taskbar_name_font = sans bold 9
|
||||
taskbar_name_font_color = #ffffff 100
|
||||
taskbar_name_active_font_color = #ffffff 100
|
||||
taskbar_distribute_size = 1
|
||||
taskbar_sort_order = none
|
||||
task_align = left
|
||||
|
||||
#-------------------------------------
|
||||
# Task
|
||||
task_text = 1
|
||||
task_icon = 1
|
||||
task_centered = 1
|
||||
urgent_nb_of_blink = 100000
|
||||
task_maximum_size = 140 35
|
||||
task_padding = 4 3 4
|
||||
task_font = sans 8
|
||||
task_tooltip = 1
|
||||
task_font_color = #ffffff 100
|
||||
task_icon_asb = 100 0 0
|
||||
task_background_id = 2
|
||||
task_active_background_id = 3
|
||||
task_urgent_background_id = 4
|
||||
task_iconified_background_id = 2
|
||||
mouse_left = toggle_iconify
|
||||
mouse_middle = none
|
||||
mouse_right = close
|
||||
mouse_scroll_up = prev_task
|
||||
mouse_scroll_down = next_task
|
||||
|
||||
#-------------------------------------
|
||||
# System tray (notification area)
|
||||
systray_padding = 4 0 2
|
||||
systray_background_id = 0
|
||||
systray_sort = ascending
|
||||
systray_icon_size = 22
|
||||
systray_icon_asb = 100 0 0
|
||||
systray_monitor = 1
|
||||
|
||||
#-------------------------------------
|
||||
# Launcher
|
||||
launcher_padding = 0 0 2
|
||||
launcher_background_id = 0
|
||||
launcher_icon_size = 22
|
||||
launcher_icon_asb = 100 0 0
|
||||
launcher_icon_theme_override = 0
|
||||
startup_notifications = 1
|
||||
launcher_tooltip = 1
|
||||
launcher_item_app = /usr/share/applications/tint2conf.desktop
|
||||
launcher_item_app = /usr/local/share/applications/tint2conf.desktop
|
||||
launcher_item_app = /usr/share/applications/firefox.desktop
|
||||
launcher_item_app = /usr/share/applications/iceweasel.desktop
|
||||
launcher_item_app = /usr/share/applications/chromium-browser.desktop
|
||||
launcher_item_app = /usr/share/applications/google-chrome.desktop
|
||||
|
||||
#-------------------------------------
|
||||
# Clock
|
||||
time1_format = %H:%M
|
||||
time2_format = %A %d %B
|
||||
time1_font = sans bold 8
|
||||
time1_timezone =
|
||||
time2_timezone =
|
||||
time2_font = sans 7
|
||||
clock_font_color = #ffffff 100
|
||||
clock_padding = 1 0
|
||||
clock_background_id = 0
|
||||
clock_tooltip =
|
||||
clock_tooltip_timezone =
|
||||
clock_lclick_command = zenity --calendar --text ""
|
||||
clock_rclick_command = orage
|
||||
|
||||
#-------------------------------------
|
||||
# Battery
|
||||
battery_low_status = 10
|
||||
battery_low_cmd = notify-send "battery low"
|
||||
bat1_font = sans 8
|
||||
bat2_font = sans 6
|
||||
battery_font_color = #ffffff 100
|
||||
battery_padding = 1 0
|
||||
battery_background_id = 0
|
||||
battery_hide = 101
|
||||
|
||||
#-------------------------------------
|
||||
# Tooltip
|
||||
tooltip_show_timeout = 0.5
|
||||
tooltip_hide_timeout = 0.1
|
||||
tooltip_padding = 2 2
|
||||
tooltip_background_id = 5
|
||||
tooltip_font_color = #222222 100
|
||||
tooltip_font = sans 9
|
||||
|
||||
@@ -59,12 +59,8 @@ launcher_icon_size = 18
|
||||
launcher_icon_asb = 100 0 0
|
||||
launcher_tooltip = 1
|
||||
startup_notifications = 1
|
||||
launcher_item_app = /usr/share/applications/tint2conf.desktop
|
||||
launcher_item_app = /usr/local/share/applications/tint2conf.desktop
|
||||
launcher_item_app = /usr/share/applications/firefox.desktop
|
||||
launcher_item_app = /usr/share/applications/iceweasel.desktop
|
||||
launcher_item_app = /usr/share/applications/chromium-browser.desktop
|
||||
launcher_item_app = /usr/share/applications/google-chrome.desktop
|
||||
|
||||
# Taskbar
|
||||
taskbar_mode = single_desktop
|
||||
@@ -89,7 +85,7 @@ urgent_nb_of_blink = 100000
|
||||
task_icon_asb = 100 0 0
|
||||
task_active_icon_asb = 100 0 0
|
||||
task_urgent_icon_asb = 100 0 0
|
||||
task_iconified_icon_asb = 100 0 0
|
||||
task_iconified_icon_asb = 70 0 0
|
||||
|
||||
# Fonts
|
||||
task_font = sans 8
|
||||
@@ -117,7 +113,7 @@ time1_format = %H:%M
|
||||
time1_font = sans 8
|
||||
time2_format = %A %d %B
|
||||
time2_font = sans 7
|
||||
clock_font_color = #FFFFFF 100
|
||||
clock_font_color = #FFFFFF 90
|
||||
clock_padding = 1 0
|
||||
clock_background_id = 0
|
||||
clock_rclick_command = orage
|
||||
@@ -136,7 +132,7 @@ battery_low_cmd = notify-send "battery low"
|
||||
battery_hide = 101
|
||||
bat1_font = sans 8
|
||||
bat2_font = sans 6
|
||||
battery_font_color = #FFFFFF 100
|
||||
battery_font_color = #FFFFFF 94
|
||||
battery_padding = 1 0
|
||||
battery_background_id = 0
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
#---- Generated by tint2conf 258e ----
|
||||
# See https://gitlab.com/o9000/tint2/wikis/Configure for
|
||||
# full documentation of the configuration options.
|
||||
#---- Generated by tint2conf c113 ----
|
||||
#-------------------------------------
|
||||
# Backgrounds
|
||||
# Background 1
|
||||
@@ -83,7 +81,6 @@ taskbar_name_font_color = #dddddd 100
|
||||
taskbar_name_active_font_color = #dddddd 100
|
||||
taskbar_distribute_size = 1
|
||||
taskbar_sort_order = none
|
||||
task_align = left
|
||||
|
||||
#-------------------------------------
|
||||
# Task
|
||||
@@ -122,15 +119,10 @@ launcher_padding = 0 0 2
|
||||
launcher_background_id = 0
|
||||
launcher_icon_size = 22
|
||||
launcher_icon_asb = 100 0 0
|
||||
launcher_icon_theme_override = 0
|
||||
startup_notifications = 1
|
||||
launcher_tooltip = 1
|
||||
launcher_item_app = /usr/share/applications/tint2conf.desktop
|
||||
launcher_item_app = /usr/local/share/applications/tint2conf.desktop
|
||||
launcher_item_app = /usr/share/applications/firefox.desktop
|
||||
launcher_item_app = /usr/share/applications/iceweasel.desktop
|
||||
launcher_item_app = /usr/share/applications/chromium-browser.desktop
|
||||
launcher_item_app = /usr/share/applications/google-chrome.desktop
|
||||
|
||||
#-------------------------------------
|
||||
# Clock
|
||||
|
||||
@@ -121,12 +121,8 @@ launcher_icon_size = 22
|
||||
launcher_icon_asb = 100 0 0
|
||||
startup_notifications = 1
|
||||
launcher_tooltip = 1
|
||||
launcher_item_app = /usr/share/applications/tint2conf.desktop
|
||||
launcher_item_app = /usr/local/share/applications/tint2conf.desktop
|
||||
launcher_item_app = /usr/share/applications/firefox.desktop
|
||||
launcher_item_app = /usr/share/applications/iceweasel.desktop
|
||||
launcher_item_app = /usr/share/applications/chromium-browser.desktop
|
||||
launcher_item_app = /usr/share/applications/google-chrome.desktop
|
||||
|
||||
#-------------------------------------
|
||||
# Clock
|
||||
|
||||
@@ -127,12 +127,8 @@ launcher_icon_size = 22
|
||||
launcher_icon_asb = 100 0 0
|
||||
startup_notifications = 1
|
||||
launcher_tooltip = 1
|
||||
launcher_item_app = /usr/share/applications/tint2conf.desktop
|
||||
launcher_item_app = /usr/local/share/applications/tint2conf.desktop
|
||||
launcher_item_app = /usr/share/applications/firefox.desktop
|
||||
launcher_item_app = /usr/share/applications/iceweasel.desktop
|
||||
launcher_item_app = /usr/share/applications/chromium-browser.desktop
|
||||
launcher_item_app = /usr/share/applications/google-chrome.desktop
|
||||
|
||||
#-------------------------------------
|
||||
# Clock
|
||||
|
||||
@@ -1,176 +0,0 @@
|
||||
#---- Generated by tint2conf e324 ----
|
||||
# See https://gitlab.com/o9000/tint2/wikis/Configure for
|
||||
# full documentation of the configuration options.
|
||||
#-------------------------------------
|
||||
# Backgrounds
|
||||
# Background 1
|
||||
rounded = 0
|
||||
border_width = 1
|
||||
background_color = #eeeeee 0
|
||||
border_color = #bbbbbb 10
|
||||
|
||||
# Background 2
|
||||
rounded = 5
|
||||
border_width = 0
|
||||
background_color = #eeeeee 4
|
||||
border_color = #cccccc 100
|
||||
|
||||
# Background 3
|
||||
rounded = 5
|
||||
border_width = 1
|
||||
background_color = #dddddd 4
|
||||
border_color = #999999 100
|
||||
|
||||
# Background 4
|
||||
rounded = 5
|
||||
border_width = 1
|
||||
background_color = #aa4400 100
|
||||
border_color = #aa7733 100
|
||||
|
||||
# Background 5
|
||||
rounded = 2
|
||||
border_width = 1
|
||||
background_color = #ffffaa 100
|
||||
border_color = #999999 100
|
||||
|
||||
# Background 6
|
||||
rounded = 2
|
||||
border_width = 1
|
||||
background_color = #eeeeee 4
|
||||
border_color = #cccccc 100
|
||||
|
||||
# Background 7
|
||||
rounded = 2
|
||||
border_width = 1
|
||||
background_color = #dddddd 3
|
||||
border_color = #999999 100
|
||||
|
||||
# Background 8
|
||||
rounded = 3
|
||||
border_width = 0
|
||||
background_color = #999999 4
|
||||
border_color = #cccccc 100
|
||||
|
||||
#-------------------------------------
|
||||
# Panel
|
||||
panel_items = CSTL
|
||||
panel_size = 100% 152
|
||||
panel_margin = 0 0
|
||||
panel_padding = 2 2 2
|
||||
panel_background_id = 1
|
||||
wm_menu = 1
|
||||
panel_dock = 0
|
||||
panel_position = bottom left vertical
|
||||
panel_layer = normal
|
||||
panel_monitor = all
|
||||
autohide = 0
|
||||
autohide_show_timeout = 0
|
||||
autohide_hide_timeout = 0.5
|
||||
autohide_height = 2
|
||||
strut_policy = follow_size
|
||||
panel_window_name = tint2
|
||||
disable_transparency = 0
|
||||
font_shadow = 0
|
||||
|
||||
#-------------------------------------
|
||||
# Taskbar
|
||||
taskbar_mode = multi_desktop
|
||||
taskbar_padding = 0 0 2
|
||||
taskbar_background_id = 0
|
||||
taskbar_active_background_id = 0
|
||||
taskbar_name = 1
|
||||
taskbar_hide_inactive_tasks = 0
|
||||
taskbar_hide_different_monitor = 0
|
||||
taskbar_name_padding = 6 3
|
||||
taskbar_name_background_id = 6
|
||||
taskbar_name_active_background_id = 7
|
||||
taskbar_name_font = sans bold 9
|
||||
taskbar_name_font_color = #ffffff 100
|
||||
taskbar_name_active_font_color = #ffffff 100
|
||||
taskbar_distribute_size = 1
|
||||
taskbar_sort_order = none
|
||||
task_align = left
|
||||
|
||||
#-------------------------------------
|
||||
# Task
|
||||
task_text = 1
|
||||
task_icon = 1
|
||||
task_centered = 0
|
||||
urgent_nb_of_blink = 100000
|
||||
task_maximum_size = 152 35
|
||||
task_padding = 4 3 4
|
||||
task_font = sans 8
|
||||
task_tooltip = 1
|
||||
task_font_color = #ffffff 100
|
||||
task_icon_asb = 100 0 0
|
||||
task_background_id = 2
|
||||
task_active_background_id = 3
|
||||
task_urgent_background_id = 4
|
||||
task_iconified_background_id = 2
|
||||
mouse_left = toggle_iconify
|
||||
mouse_middle = none
|
||||
mouse_right = close
|
||||
mouse_scroll_up = prev_task
|
||||
mouse_scroll_down = next_task
|
||||
|
||||
#-------------------------------------
|
||||
# System tray (notification area)
|
||||
systray_padding = 0 0 2
|
||||
systray_background_id = 0
|
||||
systray_sort = ascending
|
||||
systray_icon_size = 22
|
||||
systray_icon_asb = 100 0 0
|
||||
systray_monitor = 1
|
||||
|
||||
#-------------------------------------
|
||||
# Launcher
|
||||
launcher_padding = 0 0 2
|
||||
launcher_background_id = 0
|
||||
launcher_icon_size = 22
|
||||
launcher_icon_asb = 100 0 0
|
||||
launcher_icon_theme_override = 0
|
||||
startup_notifications = 1
|
||||
launcher_tooltip = 1
|
||||
launcher_item_app = /usr/share/applications/tint2conf.desktop
|
||||
launcher_item_app = /usr/local/share/applications/tint2conf.desktop
|
||||
launcher_item_app = /usr/share/applications/firefox.desktop
|
||||
launcher_item_app = /usr/share/applications/iceweasel.desktop
|
||||
launcher_item_app = /usr/share/applications/chromium-browser.desktop
|
||||
launcher_item_app = /usr/share/applications/google-chrome.desktop
|
||||
|
||||
#-------------------------------------
|
||||
# Clock
|
||||
time1_format = %H:%M
|
||||
time2_format = %A %d %B
|
||||
time1_font = sans bold 9
|
||||
time1_timezone =
|
||||
time2_timezone =
|
||||
time2_font = sans 9
|
||||
clock_font_color = #ffffff 100
|
||||
clock_padding = 1 0
|
||||
clock_background_id = 0
|
||||
clock_tooltip =
|
||||
clock_tooltip_timezone =
|
||||
clock_lclick_command = zenity --calendar --text ""
|
||||
clock_rclick_command = orage
|
||||
|
||||
#-------------------------------------
|
||||
# Battery
|
||||
battery_low_status = 10
|
||||
battery_low_cmd = notify-send "battery low"
|
||||
bat1_font = sans 8
|
||||
bat2_font = sans 6
|
||||
battery_font_color = #ffffff 100
|
||||
battery_padding = 1 0
|
||||
battery_background_id = 0
|
||||
battery_hide = 101
|
||||
|
||||
#-------------------------------------
|
||||
# Tooltip
|
||||
tooltip_show_timeout = 0.5
|
||||
tooltip_hide_timeout = 0.1
|
||||
tooltip_padding = 2 2
|
||||
tooltip_background_id = 5
|
||||
tooltip_font_color = #222222 100
|
||||
tooltip_font = sans 9
|
||||
|
||||
@@ -76,9 +76,6 @@ void update_battery_tick(void* arg)
|
||||
int16_t old_hours = battery_state.time.hours;
|
||||
int8_t old_minutes = battery_state.time.minutes;
|
||||
|
||||
if (!battery_found) {
|
||||
init_battery();
|
||||
}
|
||||
if (update_battery() != 0) {
|
||||
// Reconfigure
|
||||
init_battery();
|
||||
@@ -106,23 +103,15 @@ void update_battery_tick(void* arg)
|
||||
|
||||
int i;
|
||||
for (i = 0; i < nb_panel; i++) {
|
||||
if (!battery_found) {
|
||||
if (panel1[i].battery.area.on_screen == 1) {
|
||||
hide(&panel1[i].battery.area);
|
||||
panel_refresh = 1;
|
||||
}
|
||||
} else {
|
||||
if (battery_state.percentage >= percentage_hide) {
|
||||
if (panel1[i].battery.area.on_screen == 1) {
|
||||
hide(&panel1[i].battery.area);
|
||||
panel_refresh = 1;
|
||||
}
|
||||
} else {
|
||||
if (panel1[i].battery.area.on_screen == 0) {
|
||||
show(&panel1[i].battery.area);
|
||||
panel_refresh = 1;
|
||||
}
|
||||
}
|
||||
if (!battery_found && panel1[i].battery.area.on_screen == 1) {
|
||||
hide(&panel1[i].battery.area);
|
||||
panel_refresh = 1;
|
||||
} else if (battery_state.percentage >= percentage_hide && panel1[i].battery.area.on_screen == 1) {
|
||||
hide(&panel1[i].battery.area);
|
||||
panel_refresh = 1;
|
||||
} else if (battery_state.percentage < percentage_hide && panel1[i].battery.area.on_screen == 0) {
|
||||
show(&panel1[i].battery.area);
|
||||
panel_refresh = 1;
|
||||
}
|
||||
if (panel1[i].battery.area.on_screen == 1) {
|
||||
panel1[i].battery.area.resize = 1;
|
||||
@@ -290,7 +279,7 @@ void init_battery()
|
||||
#endif
|
||||
|
||||
if (!battery_timeout)
|
||||
battery_timeout = add_timeout(10, 30000, update_battery_tick, 0, &battery_timeout);
|
||||
battery_timeout = add_timeout(10, 10000, update_battery_tick, 0, &battery_timeout);
|
||||
}
|
||||
|
||||
|
||||
@@ -485,7 +474,7 @@ int update_battery() {
|
||||
battery_state.time.seconds = seconds;
|
||||
|
||||
if (energy_full > 0)
|
||||
new_percentage = 0.5 + ((energy_now <= energy_full ? energy_now : energy_full) * 100.0) / energy_full;
|
||||
new_percentage = ((energy_now <= energy_full ? energy_now : energy_full) * 100) / energy_full;
|
||||
|
||||
battery_state.percentage = new_percentage;
|
||||
|
||||
|
||||
57
src/config.c
57
src/config.c
@@ -41,7 +41,6 @@
|
||||
|
||||
#include "common.h"
|
||||
#include "server.h"
|
||||
#include "strnatcmp.h"
|
||||
#include "panel.h"
|
||||
#include "task.h"
|
||||
#include "taskbar.h"
|
||||
@@ -154,48 +153,23 @@ int config_get_monitor(char* monitor)
|
||||
return -1;
|
||||
}
|
||||
|
||||
static gint compare_strings(gconstpointer a, gconstpointer b)
|
||||
{
|
||||
return strnatcasecmp((const char*)a, (const char*)b);
|
||||
}
|
||||
|
||||
void load_launcher_app_dir(const char *path)
|
||||
{
|
||||
GList *subdirs = NULL;
|
||||
GList *files = NULL;
|
||||
|
||||
GDir *d = g_dir_open(path, 0, NULL);
|
||||
GDir *d = g_dir_open(path, 0, NULL);
|
||||
if (d) {
|
||||
const gchar *name;
|
||||
while ((name = g_dir_read_name(d))) {
|
||||
gchar *file = g_build_filename(path, name, NULL);
|
||||
if (!g_file_test(file, G_FILE_TEST_IS_DIR) && g_str_has_suffix(file, ".desktop")) {
|
||||
files = g_list_append(files, file);
|
||||
if (!g_file_test(file, G_FILE_TEST_IS_DIR) &&
|
||||
g_str_has_suffix(file, ".desktop")) {
|
||||
panel_config.launcher.list_apps = g_slist_append(panel_config.launcher.list_apps, strdup(file));
|
||||
} else if (g_file_test(file, G_FILE_TEST_IS_DIR)) {
|
||||
subdirs = g_list_append(subdirs, file);
|
||||
} else {
|
||||
g_free(file);
|
||||
}
|
||||
load_launcher_app_dir(file);
|
||||
}
|
||||
g_free(file);
|
||||
}
|
||||
g_dir_close(d);
|
||||
}
|
||||
|
||||
subdirs = g_list_sort(subdirs, compare_strings);
|
||||
GList *l;
|
||||
for (l = subdirs; l; l = g_list_next(l)) {
|
||||
gchar *dir = (gchar *)l->data;
|
||||
load_launcher_app_dir(dir);
|
||||
g_free(dir);
|
||||
}
|
||||
g_list_free(subdirs);
|
||||
|
||||
files = g_list_sort(files, compare_strings);
|
||||
for (l = files; l; l = g_list_next(l)) {
|
||||
gchar *file = (gchar *)l->data;
|
||||
panel_config.launcher.list_apps = g_slist_append(panel_config.launcher.list_apps, strdup(file));
|
||||
g_free(file);
|
||||
}
|
||||
g_list_free(files);
|
||||
}
|
||||
|
||||
void add_entry (char *key, char *value)
|
||||
@@ -544,15 +518,6 @@ void add_entry (char *key, char *value)
|
||||
taskbar_sort_method = TASKBAR_NOSORT;
|
||||
}
|
||||
}
|
||||
else if (strcmp (key, "task_align") == 0) {
|
||||
if (strcmp(value, "center") == 0) {
|
||||
taskbar_alignment = ALIGN_CENTER;
|
||||
} else if (strcmp(value, "right") == 0) {
|
||||
taskbar_alignment = ALIGN_RIGHT;
|
||||
} else {
|
||||
taskbar_alignment = ALIGN_LEFT;
|
||||
}
|
||||
}
|
||||
|
||||
/* Task */
|
||||
else if (strcmp (key, "task_text") == 0)
|
||||
@@ -648,13 +613,13 @@ void add_entry (char *key, char *value)
|
||||
}
|
||||
else if (strcmp(key, "systray_sort") == 0) {
|
||||
if (strcmp(value, "descending") == 0)
|
||||
systray.sort = SYSTRAY_SORT_DESCENDING;
|
||||
systray.sort = -1;
|
||||
else if (strcmp(value, "ascending") == 0)
|
||||
systray.sort = SYSTRAY_SORT_ASCENDING;
|
||||
systray.sort = 1;
|
||||
else if (strcmp(value, "left2right") == 0)
|
||||
systray.sort = SYSTRAY_SORT_LEFT2RIGHT;
|
||||
systray.sort = 2;
|
||||
else if (strcmp(value, "right2left") == 0)
|
||||
systray.sort = SYSTRAY_SORT_RIGHT2LEFT;
|
||||
systray.sort = 3;
|
||||
}
|
||||
else if (strcmp(key, "systray_icon_size") == 0) {
|
||||
systray_max_icon_size = atoi(value);
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Tint2 : freespace
|
||||
*
|
||||
* Copyright (C) 2011 Mishael A Sibiryakov (death@junki.org)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <cairo.h>
|
||||
#include <cairo-xlib.h>
|
||||
#include <pango/pangocairo.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "window.h"
|
||||
#include "server.h"
|
||||
#include "panel.h"
|
||||
#include "freespace.h"
|
||||
#include "common.h"
|
||||
|
||||
void init_freespace_panel(void *p)
|
||||
{
|
||||
Panel *panel = (Panel*)p;
|
||||
FreeSpace *freespace = &panel->freespace;
|
||||
|
||||
if (freespace->area.bg == 0)
|
||||
freespace->area.bg = &g_array_index(backgrounds, Background, 0);
|
||||
freespace->area.parent = p;
|
||||
freespace->area.panel = p;
|
||||
freespace->area.size_mode = SIZE_BY_CONTENT;
|
||||
freespace->area.resize = 1;
|
||||
freespace->area.on_screen = 1;
|
||||
freespace->area._resize = resize_freespace;
|
||||
}
|
||||
|
||||
int freespace_get_max_size(Panel *p) {
|
||||
// Get space used by every element except the freespace
|
||||
GList *walk;
|
||||
int size = 0;
|
||||
for (walk = p->area.list; walk; walk = g_list_next(walk)) {
|
||||
Area *a = (Area *)walk->data;
|
||||
|
||||
if (a->_resize == resize_freespace || !a->on_screen)
|
||||
continue;
|
||||
|
||||
if (panel_horizontal)
|
||||
size += a->width + (a->bg->border.width * 2) + p->area.paddingx;
|
||||
else
|
||||
size += a->height + (a->bg->border.width * 2) + p->area.paddingy;
|
||||
}
|
||||
|
||||
if (panel_horizontal)
|
||||
size = p->area.width - size - (p->area.bg->border.width * 2) - p->area.paddingxlr;
|
||||
else
|
||||
size = p->area.height - size - (p->area.bg->border.width * 2) - p->area.paddingxlr;
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
int resize_freespace(void *obj) {
|
||||
FreeSpace *freespace = (FreeSpace*)obj;
|
||||
Panel *panel = (Panel*)freespace->area.panel;
|
||||
if (!freespace->area.on_screen)
|
||||
return 0;
|
||||
|
||||
int old_size = panel_horizontal ? freespace->area.width : freespace->area.height;
|
||||
int size = freespace_get_max_size(panel);
|
||||
if (old_size == size)
|
||||
return 0;
|
||||
|
||||
if (panel_horizontal) {
|
||||
freespace->area.width = size;
|
||||
} else {
|
||||
freespace->area.height = size;
|
||||
}
|
||||
|
||||
freespace->area.redraw = 1;
|
||||
panel_refresh = 1;
|
||||
return 1;
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
/**************************************************************************
|
||||
* Copyright (C) 2011 Mishael A Sibiryakov (death@junki.org)
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef FREESPACE_H
|
||||
#define FREESPACE_H
|
||||
|
||||
#include "common.h"
|
||||
#include "area.h"
|
||||
|
||||
typedef struct FreeSpace {
|
||||
Area area;
|
||||
} FreeSpace;
|
||||
|
||||
void cleanup_freespace();
|
||||
void init_freespace_panel(void *panel);
|
||||
|
||||
int resize_freespace(void *obj);
|
||||
|
||||
#endif
|
||||
@@ -105,7 +105,6 @@ int read_desktop_file(const char *path, DesktopEntry *entry)
|
||||
char *key, *value;
|
||||
int i;
|
||||
|
||||
entry->path = strdup(path);
|
||||
entry->name = entry->icon = entry->exec = NULL;
|
||||
|
||||
if ((fp = fopen(path, "rt")) == NULL) {
|
||||
@@ -175,8 +174,7 @@ void free_desktop_entry(DesktopEntry *entry)
|
||||
free(entry->name);
|
||||
free(entry->icon);
|
||||
free(entry->exec);
|
||||
free(entry->path);
|
||||
entry->name = entry->icon = entry->exec = entry->path = NULL;
|
||||
entry->name = entry->icon = entry->exec = NULL;
|
||||
}
|
||||
|
||||
void test_read_desktop_file()
|
||||
|
||||
@@ -11,7 +11,6 @@ typedef struct DesktopEntry {
|
||||
char *name;
|
||||
char *exec;
|
||||
char *icon;
|
||||
char *path;
|
||||
} DesktopEntry;
|
||||
|
||||
// Parses a line of the form "key = value". Modifies the line.
|
||||
|
||||
@@ -536,9 +536,6 @@ char *get_icon_path_helper(GSList *themes, const char *icon_name, int size)
|
||||
char *next_larger = NULL;
|
||||
GSList *next_larger_theme = NULL;
|
||||
|
||||
int file_name_size = 4096;
|
||||
char *file_name = calloc(file_name_size, 1);
|
||||
|
||||
for (theme = themes; theme; theme = g_slist_next(theme)) {
|
||||
((IconTheme*)theme->data)->list_directories = g_slist_sort_with_data(((IconTheme*)theme->data)->list_directories,
|
||||
compare_theme_directories,
|
||||
@@ -563,13 +560,8 @@ char *get_icon_path_helper(GSList *themes, const char *icon_name, int size)
|
||||
char *theme_name = ((IconTheme*)theme->data)->name;
|
||||
char *dir_name = ((IconThemeDir*)dir->data)->name;
|
||||
char *extension = (char*) ext->data;
|
||||
if (strlen(base_name) + strlen(theme_name) +
|
||||
strlen(dir_name) + strlen(icon_name) + strlen(extension) + 100 > file_name_size) {
|
||||
file_name_size = strlen(base_name) + strlen(theme_name) +
|
||||
strlen(dir_name) + strlen(icon_name) + strlen(extension) + 100;
|
||||
file_name = realloc(file_name, file_name_size);
|
||||
}
|
||||
file_name[0] = 0;
|
||||
char *file_name = calloc(strlen(base_name) + strlen(theme_name) +
|
||||
strlen(dir_name) + strlen(icon_name) + strlen(extension) + 100, 1);
|
||||
// filename = directory/$(themename)/subdirectory/iconname.extension
|
||||
sprintf(file_name, "%s/%s/%s/%s%s", base_name, theme_name, dir_name, icon_name, extension);
|
||||
if (DEBUG_ICON_SEARCH)
|
||||
@@ -604,12 +596,11 @@ char *get_icon_path_helper(GSList *themes, const char *icon_name, int size)
|
||||
printf("next_larger = %s; next_larger_size = %d\n", next_larger, next_larger_size);
|
||||
}
|
||||
}
|
||||
free(file_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
free(file_name);
|
||||
file_name = NULL;
|
||||
if (next_larger) {
|
||||
g_slist_free(extensions);
|
||||
free(best_file_name);
|
||||
|
||||
@@ -31,8 +31,6 @@
|
||||
#include <glib.h>
|
||||
#include <glib/gstdio.h>
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#ifdef HAVE_RSVG
|
||||
#include <librsvg/rsvg.h>
|
||||
@@ -152,7 +150,8 @@ void cleanup_launcher_theme(Launcher *launcher)
|
||||
for (l = launcher->list_icons; l ; l = l->next) {
|
||||
LauncherIcon *launcherIcon = (LauncherIcon*)l->data;
|
||||
if (launcherIcon) {
|
||||
free_icon(launcherIcon->image);
|
||||
free_icon(launcherIcon->icon_scaled);
|
||||
free_icon(launcherIcon->icon_original);
|
||||
free(launcherIcon->icon_name);
|
||||
free(launcherIcon->icon_path);
|
||||
free(launcherIcon->cmd);
|
||||
@@ -187,7 +186,7 @@ int resize_launcher(void *obj)
|
||||
// Resize icons if necessary
|
||||
for (l = launcher->list_icons; l ; l = l->next) {
|
||||
LauncherIcon *launcherIcon = (LauncherIcon *)l->data;
|
||||
if (launcherIcon->icon_size != icon_size || !launcherIcon->image) {
|
||||
if (launcherIcon->icon_size != icon_size || !launcherIcon->icon_original) {
|
||||
launcherIcon->icon_size = icon_size;
|
||||
launcherIcon->area.width = launcherIcon->icon_size;
|
||||
launcherIcon->area.height = launcherIcon->icon_size;
|
||||
@@ -196,69 +195,69 @@ int resize_launcher(void *obj)
|
||||
char *new_icon_path = get_icon_path(launcher->list_themes, launcherIcon->icon_name, launcherIcon->icon_size);
|
||||
if (!new_icon_path) {
|
||||
// Draw a blank icon
|
||||
free_icon(launcherIcon->image);
|
||||
launcherIcon->image = NULL;
|
||||
free_icon(launcherIcon->icon_original);
|
||||
launcherIcon->icon_original = NULL;
|
||||
free_icon(launcherIcon->icon_scaled);
|
||||
launcherIcon->icon_scaled = NULL;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Free the old files
|
||||
free_icon(launcherIcon->image);
|
||||
launcherIcon->image = NULL;
|
||||
// Load the new file and scale
|
||||
launcherIcon->image = imlib_load_image_immediately(new_icon_path);
|
||||
if (launcherIcon->icon_path && strcmp(new_icon_path, launcherIcon->icon_path) == 0) {
|
||||
// If it's the same file just rescale
|
||||
free_icon(launcherIcon->icon_scaled);
|
||||
launcherIcon->icon_scaled = scale_icon(launcherIcon->icon_original, icon_size);
|
||||
free(new_icon_path);
|
||||
fprintf(stderr, "launcher.c %d: Using icon %s\n", __LINE__, launcherIcon->icon_path);
|
||||
} else {
|
||||
// Free the old files
|
||||
free_icon(launcherIcon->icon_original);
|
||||
free_icon(launcherIcon->icon_scaled);
|
||||
launcherIcon->icon_original = launcherIcon->icon_scaled = NULL;
|
||||
// Load the new file and scale
|
||||
launcherIcon->icon_original = imlib_load_image_immediately(new_icon_path);
|
||||
#ifdef HAVE_RSVG
|
||||
if (!launcherIcon->image && g_str_has_suffix(new_icon_path, ".svg")) {
|
||||
char suffix[128];
|
||||
sprintf(suffix, "tmpicon-%d.png", getpid());
|
||||
// We fork here because librsvg allocates memory like crazy
|
||||
pid_t pid = fork();
|
||||
if (pid == 0) {
|
||||
// Child
|
||||
if (!launcherIcon->icon_original && g_str_has_suffix(new_icon_path, ".svg")) {
|
||||
GError* err = NULL;
|
||||
RsvgHandle* svg = rsvg_handle_new_from_file(new_icon_path, &err);
|
||||
|
||||
if (err != NULL) {
|
||||
fprintf(stderr, "Could not load svg image!: %s", err->message);
|
||||
g_error_free(err);
|
||||
launcherIcon->image = NULL;
|
||||
launcherIcon->icon_original = NULL;
|
||||
} else {
|
||||
char suffix[128];
|
||||
sprintf(suffix, "tmpicon-%d.png", getpid());
|
||||
gchar *name = g_build_filename(g_get_user_config_dir(), "tint2", suffix, NULL);
|
||||
GdkPixbuf *pixbuf = rsvg_handle_get_pixbuf(svg);
|
||||
gdk_pixbuf_save(pixbuf, name, "png", NULL, NULL);
|
||||
launcherIcon->icon_original = imlib_load_image_immediately_without_cache(name);
|
||||
g_remove(name);
|
||||
g_free(name);
|
||||
g_object_unref(G_OBJECT(pixbuf));
|
||||
g_object_unref(G_OBJECT(svg));
|
||||
}
|
||||
exit(0);
|
||||
} else {
|
||||
// Parent
|
||||
waitpid(pid, 0, 0);
|
||||
gchar *name = g_build_filename(g_get_user_config_dir(), "tint2", suffix, NULL);
|
||||
launcherIcon->image = imlib_load_image_immediately_without_cache(name);
|
||||
g_remove(name);
|
||||
g_free(name);
|
||||
}
|
||||
} else
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
launcherIcon->image = imlib_load_image_immediately(new_icon_path);
|
||||
}
|
||||
// On loading error, fallback to default
|
||||
if (!launcherIcon->image) {
|
||||
free(new_icon_path);
|
||||
new_icon_path = get_icon_path(launcher->list_themes, DEFAULT_ICON, launcherIcon->icon_size);
|
||||
if (new_icon_path)
|
||||
launcherIcon->image = imlib_load_image_immediately(new_icon_path);
|
||||
}
|
||||
{
|
||||
launcherIcon->icon_original = imlib_load_image_immediately(new_icon_path);
|
||||
}
|
||||
// On loading error, fallback to default
|
||||
if (!launcherIcon->icon_original) {
|
||||
free(new_icon_path);
|
||||
new_icon_path = get_icon_path(launcher->list_themes, DEFAULT_ICON, launcherIcon->icon_size);
|
||||
if (new_icon_path)
|
||||
launcherIcon->icon_original = imlib_load_image_immediately(new_icon_path);
|
||||
}
|
||||
|
||||
if (!launcherIcon->image) {
|
||||
// Loading default icon failed, draw a blank icon
|
||||
free(new_icon_path);
|
||||
} else {
|
||||
// Loaded icon successfully
|
||||
Imlib_Image original = launcherIcon->image;
|
||||
launcherIcon->image = scale_icon(launcherIcon->image, launcherIcon->icon_size);
|
||||
free_icon(original);
|
||||
free(launcherIcon->icon_path);
|
||||
launcherIcon->icon_path = new_icon_path;
|
||||
fprintf(stderr, "launcher.c %d: Using icon %s\n", __LINE__, launcherIcon->icon_path);
|
||||
if (!launcherIcon->icon_original) {
|
||||
// Loading default icon failed, draw a blank icon
|
||||
free(new_icon_path);
|
||||
} else {
|
||||
// Loaded icon successfully
|
||||
launcherIcon->icon_scaled = scale_icon(launcherIcon->icon_original, launcherIcon->icon_size);
|
||||
free(launcherIcon->icon_path);
|
||||
launcherIcon->icon_path = new_icon_path;
|
||||
fprintf(stderr, "launcher.c %d: Using icon %s\n", __LINE__, launcherIcon->icon_path);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -332,7 +331,6 @@ int resize_launcher(void *obj)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -357,8 +355,9 @@ void draw_launcher_icon(void *obj, cairo_t *c)
|
||||
{
|
||||
LauncherIcon *launcherIcon = (LauncherIcon*)obj;
|
||||
|
||||
Imlib_Image icon_scaled = launcherIcon->icon_scaled;
|
||||
// Render
|
||||
imlib_context_set_image(launcherIcon->image);
|
||||
imlib_context_set_image(icon_scaled);
|
||||
if (server.real_transparency) {
|
||||
render_image(launcherIcon->area.pix, 0, 0);
|
||||
} else {
|
||||
@@ -404,7 +403,7 @@ void launcher_action(LauncherIcon *icon, XEvent* evt)
|
||||
char *cmd = calloc(strlen(icon->cmd) + 10, 1);
|
||||
sprintf(cmd, "(%s&)", icon->cmd);
|
||||
#if HAVE_SN
|
||||
SnLauncherContext* ctx = 0;
|
||||
SnLauncherContext* ctx;
|
||||
Time time;
|
||||
if (startup_notifications) {
|
||||
ctx = sn_launcher_context_new(server.sn_dsp, server.screen);
|
||||
|
||||
@@ -23,7 +23,8 @@ typedef struct Launcher {
|
||||
typedef struct LauncherIcon {
|
||||
// always start with area
|
||||
Area area;
|
||||
Imlib_Image image;
|
||||
Imlib_Image icon_scaled;
|
||||
Imlib_Image icon_original;
|
||||
char *cmd;
|
||||
char *icon_name;
|
||||
char *icon_path;
|
||||
|
||||
13
src/panel.c
13
src/panel.c
@@ -204,8 +204,6 @@ void init_panel()
|
||||
}
|
||||
if (panel_items_order[k] == 'C')
|
||||
init_clock_panel(p);
|
||||
if (panel_items_order[k] == 'F' && !strstr(panel_items_order, "T"))
|
||||
init_freespace_panel(p);
|
||||
}
|
||||
set_panel_items_order(p);
|
||||
|
||||
@@ -324,13 +322,13 @@ void init_panel_size_and_position(Panel *panel)
|
||||
|
||||
int resize_panel(void *obj)
|
||||
{
|
||||
Panel *panel = (Panel*)obj;
|
||||
resize_by_layout(panel, 0);
|
||||
resize_by_layout(obj, 0);
|
||||
|
||||
//printf("resize_panel\n");
|
||||
if (panel_mode != MULTI_DESKTOP && taskbar_enabled) {
|
||||
// propagate width/height on hidden taskbar
|
||||
int i, width, height;
|
||||
Panel *panel = (Panel*)obj;
|
||||
width = panel->taskbar[server.desktop].area.width;
|
||||
height = panel->taskbar[server.desktop].area.height;
|
||||
for (i=0 ; i < panel->nb_desktop ; i++) {
|
||||
@@ -341,6 +339,7 @@ int resize_panel(void *obj)
|
||||
}
|
||||
if (panel_mode == MULTI_DESKTOP && taskbar_enabled && taskbar_distribute_size) {
|
||||
// Distribute the available space between taskbars
|
||||
Panel *panel = (Panel*)obj;
|
||||
|
||||
// Compute the total available size, and the total size requested by the taskbars
|
||||
int total_size = 0;
|
||||
@@ -419,8 +418,6 @@ int resize_panel(void *obj)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (panel->freespace.area.on_screen)
|
||||
resize_freespace(&panel->freespace);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -508,8 +505,6 @@ void set_panel_items_order(Panel *p)
|
||||
}
|
||||
if (panel_items_order[k] == 'C')
|
||||
p->area.list = g_list_append(p->area.list, &p->clock);
|
||||
if (panel_items_order[k] == 'F')
|
||||
p->area.list = g_list_append(p->area.list, &p->freespace);
|
||||
}
|
||||
init_rendering(&p->area, 0);
|
||||
}
|
||||
@@ -549,7 +544,7 @@ void set_panel_properties(Panel *p)
|
||||
memset(&wmhints, 0, sizeof(wmhints));
|
||||
if (panel_dock) {
|
||||
// Necessary for placing the panel into the dock on Openbox and Fluxbox.
|
||||
// See https://gitlab.com/o9000/tint2/issues/465
|
||||
// See https://code.google.com/p/tint2/issues/detail?id=465
|
||||
wmhints.icon_window = wmhints.window_group = p->main_win;
|
||||
wmhints.flags = StateHint | IconWindowHint;
|
||||
wmhints.initial_state = WithdrawnState;
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include "taskbar.h"
|
||||
#include "systraybar.h"
|
||||
#include "launcher.h"
|
||||
#include "freespace.h"
|
||||
|
||||
#ifdef ENABLE_BATTERY
|
||||
#include "battery.h"
|
||||
@@ -117,8 +116,6 @@ typedef struct {
|
||||
|
||||
Launcher launcher;
|
||||
|
||||
FreeSpace freespace;
|
||||
|
||||
// autohide
|
||||
int is_hidden;
|
||||
int hidden_width, hidden_height;
|
||||
|
||||
@@ -98,7 +98,6 @@ void server_init_atoms ()
|
||||
server.atom._NET_SYSTEM_TRAY_ORIENTATION = XInternAtom(server.dsp, "_NET_SYSTEM_TRAY_ORIENTATION", False);
|
||||
server.atom._XEMBED = XInternAtom(server.dsp, "_XEMBED", False);
|
||||
server.atom._XEMBED_INFO = XInternAtom(server.dsp, "_XEMBED_INFO", False);
|
||||
server.atom._NET_WM_PID = XInternAtom(server.dsp, "_NET_WM_PID", True);
|
||||
|
||||
// drag 'n' drop
|
||||
server.atom.XdndAware = XInternAtom(server.dsp, "XdndAware", False);
|
||||
@@ -284,7 +283,7 @@ void get_monitors()
|
||||
if (res && res->ncrtc >= nbmonitor) {
|
||||
// use xrandr to identify monitors (does not work with proprietery nvidia drivers)
|
||||
|
||||
// Workaround for issue https://gitlab.com/o9000/tint2/issues/353
|
||||
// Workaround for issue https://code.google.com/p/tint2/issues/detail?id=353
|
||||
// on some recent configs, XRRGetScreenResourcesCurrent returns a fantom monitor at last position
|
||||
{
|
||||
int i = res->ncrtc - 1;
|
||||
|
||||
@@ -15,8 +15,9 @@
|
||||
|
||||
#ifdef HAVE_SN
|
||||
#include <libsn/sn.h>
|
||||
#endif
|
||||
#include <glib.h>
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct Global_atom
|
||||
{
|
||||
@@ -73,7 +74,6 @@ typedef struct Global_atom
|
||||
Atom _NET_SYSTEM_TRAY_ORIENTATION;
|
||||
Atom _XEMBED;
|
||||
Atom _XEMBED_INFO;
|
||||
Atom _NET_WM_PID;
|
||||
Atom _XSETTINGS_SCREEN;
|
||||
Atom _XSETTINGS_SETTINGS;
|
||||
Atom XdndAware;
|
||||
@@ -154,4 +154,4 @@ void get_monitors();
|
||||
void get_desktops();
|
||||
int server_get_number_of_desktops();
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -20,7 +20,6 @@
|
||||
// Flags for _XEMBED_INFO
|
||||
#define XEMBED_MAPPED (1 << 0)
|
||||
|
||||
enum { SYSTRAY_SORT_ASCENDING, SYSTRAY_SORT_DESCENDING, SYSTRAY_SORT_LEFT2RIGHT, SYSTRAY_SORT_RIGHT2LEFT };
|
||||
|
||||
typedef struct {
|
||||
// always start with area
|
||||
@@ -35,8 +34,8 @@ typedef struct {
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Window parent;
|
||||
Window win;
|
||||
Window id;
|
||||
Window tray_id;
|
||||
int x, y;
|
||||
int width, height;
|
||||
// TODO: manage icon's show/hide
|
||||
@@ -44,13 +43,6 @@ typedef struct
|
||||
int depth;
|
||||
Damage damage;
|
||||
timeout* render_timeout;
|
||||
int empty;
|
||||
int pid;
|
||||
int chrono;
|
||||
struct timespec time_last_render;
|
||||
int num_fast_renders;
|
||||
int reparented;
|
||||
char *name;
|
||||
} TrayWindow;
|
||||
|
||||
|
||||
@@ -61,7 +53,6 @@ extern int refresh_systray;
|
||||
extern int systray_enabled;
|
||||
extern int systray_max_icon_size;
|
||||
extern int systray_monitor;
|
||||
extern int systray_profile;
|
||||
|
||||
// default global data
|
||||
void default_systray();
|
||||
@@ -87,10 +78,8 @@ void net_message(XClientMessageEvent *e);
|
||||
gboolean add_icon(Window id);
|
||||
void remove_icon(TrayWindow *traywin);
|
||||
|
||||
void refresh_systray_icons();
|
||||
void systray_render_icon(void *t);
|
||||
void systray_reconfigure_event(TrayWindow *traywin, XEvent *e);
|
||||
void systray_destroy_event(TrayWindow *traywin);
|
||||
void refresh_systray_icon();
|
||||
void systray_render_icon(TrayWindow* traywin);
|
||||
void kde_update_icons();
|
||||
|
||||
#endif
|
||||
|
||||
@@ -50,9 +50,6 @@ Task *add_task (Window win)
|
||||
if (!win) return 0;
|
||||
if (window_is_hidden(win)) return 0;
|
||||
|
||||
XSelectInput(server.dsp, win, PropertyChangeMask|StructureNotifyMask);
|
||||
XFlush(server.dsp);
|
||||
|
||||
int monitor;
|
||||
if (nb_panel > 1) {
|
||||
monitor = window_get_monitor (win);
|
||||
@@ -78,7 +75,8 @@ Task *add_task (Window win)
|
||||
get_title(&new_tsk);
|
||||
get_icon(&new_tsk);
|
||||
|
||||
//printf("new task %s win %u: desktop %d, monitor %d\n", new_tsk.title, win, new_tsk.desktop, monitor);
|
||||
//printf("task %s : desktop %d, monitor %d\n", new_tsk->title, desktop, monitor);
|
||||
XSelectInput (server.dsp, new_tsk.win, PropertyChangeMask|StructureNotifyMask);
|
||||
|
||||
GPtrArray* task_group = g_ptr_array_new();
|
||||
Taskbar *tskbar;
|
||||
|
||||
@@ -47,7 +47,6 @@ int taskbar_distribute_size;
|
||||
int hide_inactive_tasks;
|
||||
int hide_task_diff_monitor;
|
||||
int taskbar_sort_method;
|
||||
int taskbar_alignment;
|
||||
|
||||
guint win_hash(gconstpointer key) { return (guint)*((Window*)key); }
|
||||
gboolean win_compare(gconstpointer a, gconstpointer b) { return (*((Window*)a) == *((Window*)b)); }
|
||||
@@ -64,7 +63,6 @@ void default_taskbar()
|
||||
hide_inactive_tasks = 0;
|
||||
hide_task_diff_monitor = 0;
|
||||
taskbar_sort_method = TASKBAR_NOSORT;
|
||||
taskbar_alignment = ALIGN_LEFT;
|
||||
default_taskbarname();
|
||||
}
|
||||
|
||||
@@ -155,7 +153,7 @@ void init_taskbar_panel(void *p)
|
||||
panel->g_taskbar.area.parent = panel;
|
||||
panel->g_taskbar.area.panel = panel;
|
||||
panel->g_taskbar.area.size_mode = SIZE_BY_LAYOUT;
|
||||
panel->g_taskbar.area.alignment = taskbar_alignment;
|
||||
panel->g_taskbar.area.alignment = ALIGN_CENTER;
|
||||
panel->g_taskbar.area._resize = resize_taskbar;
|
||||
panel->g_taskbar.area._draw_foreground = draw_taskbar;
|
||||
panel->g_taskbar.area._on_change_layout = on_change_taskbar;
|
||||
|
||||
@@ -21,7 +21,6 @@ extern int hide_inactive_tasks;
|
||||
extern int hide_task_diff_monitor;
|
||||
enum { TASKBAR_NOSORT, TASKBAR_SORT_CENTER, TASKBAR_SORT_TITLE };
|
||||
extern int taskbar_sort_method;
|
||||
extern int taskbar_alignment;
|
||||
|
||||
typedef struct {
|
||||
// always start with area
|
||||
|
||||
697
src/tint.c
697
src/tint.c
@@ -20,7 +20,6 @@
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
@@ -59,43 +58,6 @@ Atom dnd_atom;
|
||||
int dnd_sent_request;
|
||||
char *dnd_launcher_exec;
|
||||
|
||||
timeout* detect_compositor_timer = NULL;
|
||||
int detect_compositor_timer_counter = 0;
|
||||
|
||||
void detect_compositor(void *arg)
|
||||
{
|
||||
if (server.composite_manager) {
|
||||
stop_timeout(detect_compositor_timer);
|
||||
return;
|
||||
}
|
||||
|
||||
detect_compositor_timer_counter--;
|
||||
if (detect_compositor_timer_counter < 0) {
|
||||
stop_timeout(detect_compositor_timer);
|
||||
return;
|
||||
}
|
||||
|
||||
// No compositor, check for one
|
||||
if (XGetSelectionOwner(server.dsp, server.atom._NET_WM_CM_S0) != None) {
|
||||
stop_timeout(detect_compositor_timer);
|
||||
// Restart tint2
|
||||
fprintf(stderr, "Detected compositor, restarting tint2...\n");
|
||||
kill(getpid(), SIGUSR1);
|
||||
}
|
||||
}
|
||||
|
||||
void start_detect_compositor()
|
||||
{
|
||||
// Already have a compositor, nothing to do
|
||||
if (server.composite_manager)
|
||||
return;
|
||||
|
||||
stop_timeout(detect_compositor_timer);
|
||||
// Check every 0.5 seconds for up to 30 seconds
|
||||
detect_compositor_timer_counter = 60;
|
||||
detect_compositor_timer = add_timeout(500, 500, detect_compositor, 0, &detect_compositor_timer);
|
||||
}
|
||||
|
||||
void signal_handler(int sig)
|
||||
{
|
||||
// signal handler is light as it should be
|
||||
@@ -155,12 +117,12 @@ void init (int argc, char *argv[])
|
||||
// BSD does not support pselect(), therefore we have to use select and hope that we do not
|
||||
// end up in a race condition there (see 'man select()' on a linux machine for more information)
|
||||
// block all signals, such that no race conditions occur before pselect in our main loop
|
||||
// sigset_t block_mask;
|
||||
// sigaddset(&block_mask, SIGINT);
|
||||
// sigaddset(&block_mask, SIGTERM);
|
||||
// sigaddset(&block_mask, SIGHUP);
|
||||
// sigaddset(&block_mask, SIGUSR1);
|
||||
// sigprocmask(SIG_BLOCK, &block_mask, 0);
|
||||
// sigset_t block_mask;
|
||||
// sigaddset(&block_mask, SIGINT);
|
||||
// sigaddset(&block_mask, SIGTERM);
|
||||
// sigaddset(&block_mask, SIGHUP);
|
||||
// sigaddset(&block_mask, SIGUSR1);
|
||||
// sigprocmask(SIG_BLOCK, &block_mask, 0);
|
||||
}
|
||||
|
||||
static int sn_pipe_valid = 0;
|
||||
@@ -203,7 +165,9 @@ static void sigchld_handler_async() {
|
||||
while ((pid = waitpid(-1, NULL, WNOHANG)) > 0) {
|
||||
SnLauncherContext *ctx;
|
||||
ctx = (SnLauncherContext *) g_tree_lookup (server.pids, GINT_TO_POINTER (pid));
|
||||
if (ctx) {
|
||||
if (ctx == NULL) {
|
||||
fprintf(stderr, "Unknown child %d terminated!\n", pid);
|
||||
} else {
|
||||
g_tree_remove (server.pids, GINT_TO_POINTER (pid));
|
||||
sn_launcher_context_complete (ctx);
|
||||
sn_launcher_context_unref (ctx);
|
||||
@@ -239,9 +203,6 @@ void init_X11_pre_config()
|
||||
// config file use '.' as decimal separator
|
||||
setlocale(LC_NUMERIC, "POSIX");
|
||||
|
||||
/* Catch events */
|
||||
XSelectInput (server.dsp, server.root_win, PropertyChangeMask|StructureNotifyMask);
|
||||
|
||||
// get monitor and desktop config
|
||||
get_monitors();
|
||||
get_desktops();
|
||||
@@ -263,11 +224,9 @@ void init_X11_post_config()
|
||||
if (pipe(sn_pipe) != 0) {
|
||||
fprintf(stderr, "Creating pipe failed.\n");
|
||||
} else {
|
||||
fcntl(sn_pipe[0], F_SETFL, O_NONBLOCK | fcntl(sn_pipe[0], F_GETFL));
|
||||
fcntl(sn_pipe[1], F_SETFL, O_NONBLOCK | fcntl(sn_pipe[1], F_GETFL));
|
||||
sn_pipe_valid = 1;
|
||||
struct sigaction act;
|
||||
memset(&act, 0, sizeof(struct sigaction));
|
||||
memset (&act, 0, sizeof (struct sigaction));
|
||||
act.sa_handler = sigchld_handler;
|
||||
if (sigaction(SIGCHLD, &act, 0)) {
|
||||
perror("sigaction");
|
||||
@@ -280,6 +239,9 @@ void init_X11_post_config()
|
||||
imlib_context_set_visual (server.visual);
|
||||
imlib_context_set_colormap (server.colormap);
|
||||
|
||||
/* Catch events */
|
||||
XSelectInput (server.dsp, server.root_win, PropertyChangeMask|StructureNotifyMask);
|
||||
|
||||
// load default icon
|
||||
gchar *path;
|
||||
const gchar * const *data_dirs;
|
||||
@@ -361,60 +323,60 @@ void window_action (Task *tsk, int action)
|
||||
if (!tsk) return;
|
||||
int desk;
|
||||
switch (action) {
|
||||
case CLOSE:
|
||||
set_close (tsk->win);
|
||||
break;
|
||||
case TOGGLE:
|
||||
set_active(tsk->win);
|
||||
break;
|
||||
case ICONIFY:
|
||||
XIconifyWindow (server.dsp, tsk->win, server.screen);
|
||||
break;
|
||||
case TOGGLE_ICONIFY:
|
||||
if (task_active && tsk->win == task_active->win)
|
||||
case CLOSE:
|
||||
set_close (tsk->win);
|
||||
break;
|
||||
case TOGGLE:
|
||||
set_active(tsk->win);
|
||||
break;
|
||||
case ICONIFY:
|
||||
XIconifyWindow (server.dsp, tsk->win, server.screen);
|
||||
else
|
||||
set_active (tsk->win);
|
||||
break;
|
||||
case SHADE:
|
||||
window_toggle_shade (tsk->win);
|
||||
break;
|
||||
case MAXIMIZE_RESTORE:
|
||||
window_maximize_restore (tsk->win);
|
||||
break;
|
||||
case MAXIMIZE:
|
||||
window_maximize_restore (tsk->win);
|
||||
break;
|
||||
case RESTORE:
|
||||
window_maximize_restore (tsk->win);
|
||||
break;
|
||||
case DESKTOP_LEFT:
|
||||
if ( tsk->desktop == 0 ) break;
|
||||
desk = tsk->desktop - 1;
|
||||
windows_set_desktop(tsk->win, desk);
|
||||
if (desk == server.desktop)
|
||||
set_active(tsk->win);
|
||||
break;
|
||||
case DESKTOP_RIGHT:
|
||||
if (tsk->desktop == server.nb_desktop ) break;
|
||||
desk = tsk->desktop + 1;
|
||||
windows_set_desktop(tsk->win, desk);
|
||||
if (desk == server.desktop)
|
||||
set_active(tsk->win);
|
||||
break;
|
||||
case NEXT_TASK:
|
||||
{
|
||||
Task *tsk1;
|
||||
tsk1 = next_task(find_active_task(tsk, task_active));
|
||||
set_active(tsk1->win);
|
||||
}
|
||||
break;
|
||||
case PREV_TASK:
|
||||
{
|
||||
Task *tsk1;
|
||||
tsk1 = prev_task(find_active_task(tsk, task_active));
|
||||
set_active(tsk1->win);
|
||||
}
|
||||
break;
|
||||
case TOGGLE_ICONIFY:
|
||||
if (task_active && tsk->win == task_active->win)
|
||||
XIconifyWindow (server.dsp, tsk->win, server.screen);
|
||||
else
|
||||
set_active (tsk->win);
|
||||
break;
|
||||
case SHADE:
|
||||
window_toggle_shade (tsk->win);
|
||||
break;
|
||||
case MAXIMIZE_RESTORE:
|
||||
window_maximize_restore (tsk->win);
|
||||
break;
|
||||
case MAXIMIZE:
|
||||
window_maximize_restore (tsk->win);
|
||||
break;
|
||||
case RESTORE:
|
||||
window_maximize_restore (tsk->win);
|
||||
break;
|
||||
case DESKTOP_LEFT:
|
||||
if ( tsk->desktop == 0 ) break;
|
||||
desk = tsk->desktop - 1;
|
||||
windows_set_desktop(tsk->win, desk);
|
||||
if (desk == server.desktop)
|
||||
set_active(tsk->win);
|
||||
break;
|
||||
case DESKTOP_RIGHT:
|
||||
if (tsk->desktop == server.nb_desktop ) break;
|
||||
desk = tsk->desktop + 1;
|
||||
windows_set_desktop(tsk->win, desk);
|
||||
if (desk == server.desktop)
|
||||
set_active(tsk->win);
|
||||
break;
|
||||
case NEXT_TASK:
|
||||
{
|
||||
Task *tsk1;
|
||||
tsk1 = next_task(find_active_task(tsk, task_active));
|
||||
set_active(tsk1->win);
|
||||
}
|
||||
break;
|
||||
case PREV_TASK:
|
||||
{
|
||||
Task *tsk1;
|
||||
tsk1 = prev_task(find_active_task(tsk, task_active));
|
||||
set_active(tsk1->win);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -424,10 +386,10 @@ int tint2_handles_click(Panel* panel, XButtonEvent* e)
|
||||
Task* task = click_task(panel, e->x, e->y);
|
||||
if (task) {
|
||||
if( (e->button == 1 && mouse_left != 0)
|
||||
|| (e->button == 2 && mouse_middle != 0)
|
||||
|| (e->button == 3 && mouse_right != 0)
|
||||
|| (e->button == 4 && mouse_scroll_up != 0)
|
||||
|| (e->button == 5 && mouse_scroll_down !=0) )
|
||||
|| (e->button == 2 && mouse_middle != 0)
|
||||
|| (e->button == 3 && mouse_right != 0)
|
||||
|| (e->button == 4 && mouse_scroll_up != 0)
|
||||
|| (e->button == 5 && mouse_scroll_down !=0) )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
@@ -568,27 +530,27 @@ void event_button_release (XEvent *e)
|
||||
|
||||
int action = TOGGLE_ICONIFY;
|
||||
switch (e->xbutton.button) {
|
||||
case 1:
|
||||
action = mouse_left;
|
||||
break;
|
||||
case 2:
|
||||
action = mouse_middle;
|
||||
break;
|
||||
case 3:
|
||||
action = mouse_right;
|
||||
break;
|
||||
case 4:
|
||||
action = mouse_scroll_up;
|
||||
break;
|
||||
case 5:
|
||||
action = mouse_scroll_down;
|
||||
break;
|
||||
case 6:
|
||||
action = mouse_tilt_left;
|
||||
break;
|
||||
case 7:
|
||||
action = mouse_tilt_right;
|
||||
break;
|
||||
case 1:
|
||||
action = mouse_left;
|
||||
break;
|
||||
case 2:
|
||||
action = mouse_middle;
|
||||
break;
|
||||
case 3:
|
||||
action = mouse_right;
|
||||
break;
|
||||
case 4:
|
||||
action = mouse_scroll_up;
|
||||
break;
|
||||
case 5:
|
||||
action = mouse_scroll_down;
|
||||
break;
|
||||
case 6:
|
||||
action = mouse_tilt_left;
|
||||
break;
|
||||
case 7:
|
||||
action = mouse_tilt_right;
|
||||
break;
|
||||
}
|
||||
|
||||
if ( click_clock(panel, e->xbutton.x, e->xbutton.y)) {
|
||||
@@ -657,7 +619,8 @@ void event_property_notify (XEvent *e)
|
||||
// Change name of desktops
|
||||
else if (at == server.atom._NET_DESKTOP_NAMES) {
|
||||
if (!taskbarname_enabled) return;
|
||||
GSList *l, *list = server_get_name_of_desktop();
|
||||
GSList *list = server_get_name_of_desktop();
|
||||
GSList *l;
|
||||
int j;
|
||||
gchar *name;
|
||||
Taskbar *tskbar;
|
||||
@@ -764,7 +727,6 @@ void event_property_notify (XEvent *e)
|
||||
}
|
||||
else {
|
||||
tsk = task_get_task (win);
|
||||
//printf("change win = %u, task = %p\n", win, tsk);
|
||||
if (!tsk) {
|
||||
if (at != server.atom._NET_WM_STATE)
|
||||
return;
|
||||
@@ -855,10 +817,8 @@ void event_expose (XEvent *e)
|
||||
}
|
||||
|
||||
|
||||
void event_configure_notify(XEvent *e)
|
||||
void event_configure_notify (Window win)
|
||||
{
|
||||
Window win = e->xconfigure.window;
|
||||
|
||||
// change in root window (xrandr)
|
||||
if (win == server.root_win) {
|
||||
signal_pending = SIGUSR1;
|
||||
@@ -870,8 +830,11 @@ void event_configure_notify(XEvent *e)
|
||||
GSList *l;
|
||||
for (l = systray.list_icons; l ; l = l->next) {
|
||||
traywin = (TrayWindow*)l->data;
|
||||
if (traywin->win == win) {
|
||||
systray_reconfigure_event(traywin, e);
|
||||
if (traywin->tray_id == win) {
|
||||
//printf("move tray %d\n", traywin->x);
|
||||
XMoveResizeWindow(server.dsp, traywin->id, traywin->x, traywin->y, traywin->width, traywin->height);
|
||||
XResizeWindow(server.dsp, traywin->tray_id, traywin->width, traywin->height);
|
||||
panel_refresh = 1;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -931,8 +894,8 @@ struct Property read_property(Display* disp, Window w, Atom property)
|
||||
if (ret != 0)
|
||||
XFree(ret);
|
||||
XGetWindowProperty(disp, w, property, 0, read_bytes, False, AnyPropertyType,
|
||||
&actual_type, &actual_format, &nitems, &bytes_after,
|
||||
&ret);
|
||||
&actual_type, &actual_format, &nitems, &bytes_after,
|
||||
&ret);
|
||||
read_bytes *= 2;
|
||||
} while (bytes_after != 0);
|
||||
|
||||
@@ -1116,7 +1079,7 @@ int main (int argc, char *argv[])
|
||||
int x11_fd, i;
|
||||
Panel *panel;
|
||||
GSList *it;
|
||||
struct timeval* select_timeout;
|
||||
struct timeval* timeout;
|
||||
int hidden_dnd = 0;
|
||||
|
||||
// Make stdout/stderr flush after a newline (for some reason they don't even if tint2 is started from a terminal)
|
||||
@@ -1140,7 +1103,6 @@ start:
|
||||
}
|
||||
|
||||
init_X11_post_config();
|
||||
start_detect_compositor();
|
||||
|
||||
init_panel();
|
||||
if (snapshot_path) {
|
||||
@@ -1163,37 +1125,37 @@ start:
|
||||
dnd_sent_request = 0;
|
||||
dnd_launcher_exec = 0;
|
||||
|
||||
// sigset_t empty_mask;
|
||||
// sigemptyset(&empty_mask);
|
||||
// sigset_t empty_mask;
|
||||
// sigemptyset(&empty_mask);
|
||||
|
||||
while (1) {
|
||||
if (panel_refresh) {
|
||||
if (systray_profile)
|
||||
fprintf(stderr, BLUE "[%f] %s:%d redrawing panel\n" RESET, profiling_get_time(), __FUNCTION__, __LINE__);
|
||||
panel_refresh = 0;
|
||||
|
||||
for (i = 0; i < nb_panel ;i++) {
|
||||
for (i=0 ; i < nb_panel ; i++) {
|
||||
panel = &panel1[i];
|
||||
|
||||
if (panel->is_hidden) {
|
||||
XCopyArea(server.dsp, panel->hidden_pixmap, panel->main_win, server.gc, 0, 0, panel->hidden_width, panel->hidden_height, 0, 0);
|
||||
XSetWindowBackgroundPixmap(server.dsp, panel->main_win, panel->hidden_pixmap);
|
||||
} else {
|
||||
if (panel->temp_pmap)
|
||||
XFreePixmap(server.dsp, panel->temp_pmap);
|
||||
}
|
||||
else {
|
||||
if (panel->temp_pmap) XFreePixmap(server.dsp, panel->temp_pmap);
|
||||
panel->temp_pmap = XCreatePixmap(server.dsp, server.root_win, panel->area.width, panel->area.height, server.depth);
|
||||
rendering(panel);
|
||||
if (panel == (Panel*)systray.area.panel) {
|
||||
if (refresh_systray && panel && !panel->is_hidden) {
|
||||
refresh_systray = 0;
|
||||
XSetWindowBackgroundPixmap(server.dsp, panel->main_win, panel->temp_pmap);
|
||||
refresh_systray_icons();
|
||||
}
|
||||
}
|
||||
XCopyArea(server.dsp, panel->temp_pmap, panel->main_win, server.gc, 0, 0, panel->area.width, panel->area.height, 0, 0);
|
||||
}
|
||||
}
|
||||
XFlush(server.dsp);
|
||||
XFlush (server.dsp);
|
||||
|
||||
panel = (Panel*)systray.area.panel;
|
||||
if (refresh_systray && panel && !panel->is_hidden) {
|
||||
refresh_systray = 0;
|
||||
// tint2 doen't draw systray icons. it just redraw background.
|
||||
XSetWindowBackgroundPixmap (server.dsp, panel->main_win, panel->temp_pmap);
|
||||
// force icon's refresh
|
||||
refresh_systray_icon();
|
||||
}
|
||||
}
|
||||
|
||||
// thanks to AngryLlama for the timer
|
||||
@@ -1207,249 +1169,253 @@ start:
|
||||
}
|
||||
update_next_timeout();
|
||||
if (next_timeout.tv_sec >= 0 && next_timeout.tv_usec >= 0)
|
||||
select_timeout = &next_timeout;
|
||||
timeout = &next_timeout;
|
||||
else
|
||||
select_timeout = 0;
|
||||
timeout = 0;
|
||||
|
||||
// Wait for X Event or a Timer
|
||||
if (XPending(server.dsp) > 0 || select(maxfd+1, &fdset, 0, 0, select_timeout) >= 0) {
|
||||
if (sn_pipe_valid) {
|
||||
if (select(maxfd+1, &fdset, 0, 0, timeout) > 0) {
|
||||
if (FD_ISSET(sn_pipe[0], &fdset)) {
|
||||
char buffer[1];
|
||||
while (read(sn_pipe[0], buffer, sizeof(buffer)) > 0) {
|
||||
sigchld_handler_async();
|
||||
}
|
||||
ssize_t wur = read(sn_pipe[0], buffer, 1);
|
||||
(void) wur;
|
||||
sigchld_handler_async();
|
||||
}
|
||||
while (XPending(server.dsp) > 0) {
|
||||
XNextEvent(server.dsp, &e);
|
||||
if (FD_ISSET(x11_fd, &fdset)) {
|
||||
while (XPending (server.dsp)) {
|
||||
XNextEvent(server.dsp, &e);
|
||||
#if HAVE_SN
|
||||
if (startup_notifications)
|
||||
sn_display_process_event(server.sn_dsp, &e);
|
||||
if (startup_notifications)
|
||||
sn_display_process_event(server.sn_dsp, &e);
|
||||
#endif // HAVE_SN
|
||||
|
||||
panel = get_panel(e.xany.window);
|
||||
if (panel && panel_autohide) {
|
||||
if (e.type == EnterNotify)
|
||||
autohide_trigger_show(panel);
|
||||
else if (e.type == LeaveNotify)
|
||||
autohide_trigger_hide(panel);
|
||||
if (panel->is_hidden) {
|
||||
if (e.type == ClientMessage && e.xclient.message_type == server.atom.XdndPosition) {
|
||||
hidden_dnd = 1;
|
||||
autohide_show(panel);
|
||||
panel = get_panel(e.xany.window);
|
||||
if (panel && panel_autohide) {
|
||||
if (e.type == EnterNotify)
|
||||
autohide_trigger_show(panel);
|
||||
else if (e.type == LeaveNotify)
|
||||
autohide_trigger_hide(panel);
|
||||
if (panel->is_hidden) {
|
||||
if (e.type == ClientMessage && e.xclient.message_type == server.atom.XdndPosition) {
|
||||
hidden_dnd = 1;
|
||||
autohide_show(panel);
|
||||
}
|
||||
else
|
||||
continue; // discard further processing of this event because the panel is not visible yet
|
||||
}
|
||||
else if (hidden_dnd && e.type == ClientMessage && e.xclient.message_type == server.atom.XdndLeave) {
|
||||
hidden_dnd = 0;
|
||||
autohide_hide(panel);
|
||||
}
|
||||
}
|
||||
|
||||
switch (e.type) {
|
||||
case ButtonPress:
|
||||
tooltip_hide(0);
|
||||
event_button_press (&e);
|
||||
break;
|
||||
|
||||
case ButtonRelease:
|
||||
event_button_release(&e);
|
||||
break;
|
||||
|
||||
case MotionNotify: {
|
||||
unsigned int button_mask = Button1Mask | Button2Mask | Button3Mask | Button4Mask | Button5Mask;
|
||||
if (e.xmotion.state & button_mask)
|
||||
event_button_motion_notify (&e);
|
||||
|
||||
Panel* panel = get_panel(e.xmotion.window);
|
||||
Area* area = click_area(panel, e.xmotion.x, e.xmotion.y);
|
||||
if (area->_get_tooltip_text)
|
||||
tooltip_trigger_show(area, panel, &e);
|
||||
else
|
||||
continue; // discard further processing of this event because the panel is not visible yet
|
||||
tooltip_trigger_hide();
|
||||
break;
|
||||
}
|
||||
else if (hidden_dnd && e.type == ClientMessage && e.xclient.message_type == server.atom.XdndLeave) {
|
||||
hidden_dnd = 0;
|
||||
autohide_hide(panel);
|
||||
}
|
||||
}
|
||||
|
||||
switch (e.type) {
|
||||
case ButtonPress:
|
||||
tooltip_hide(0);
|
||||
event_button_press (&e);
|
||||
break;
|
||||
|
||||
case ButtonRelease:
|
||||
event_button_release(&e);
|
||||
break;
|
||||
|
||||
case MotionNotify: {
|
||||
unsigned int button_mask = Button1Mask | Button2Mask | Button3Mask | Button4Mask | Button5Mask;
|
||||
if (e.xmotion.state & button_mask)
|
||||
event_button_motion_notify (&e);
|
||||
|
||||
Panel* panel = get_panel(e.xmotion.window);
|
||||
Area* area = click_area(panel, e.xmotion.x, e.xmotion.y);
|
||||
if (area->_get_tooltip_text)
|
||||
tooltip_trigger_show(area, panel, &e);
|
||||
else
|
||||
case LeaveNotify:
|
||||
tooltip_trigger_hide();
|
||||
break;
|
||||
}
|
||||
|
||||
case LeaveNotify:
|
||||
tooltip_trigger_hide();
|
||||
break;
|
||||
|
||||
case Expose:
|
||||
event_expose(&e);
|
||||
break;
|
||||
|
||||
case PropertyNotify:
|
||||
event_property_notify(&e);
|
||||
break;
|
||||
|
||||
case ConfigureNotify:
|
||||
event_configure_notify(&e);
|
||||
break;
|
||||
|
||||
case ReparentNotify:
|
||||
if (!systray_enabled)
|
||||
break;
|
||||
panel = (Panel*)systray.area.panel;
|
||||
if (e.xany.window == panel->main_win) // reparented to us
|
||||
|
||||
case Expose:
|
||||
event_expose(&e);
|
||||
break;
|
||||
// FIXME: 'reparent to us' badly detected => disabled
|
||||
break;
|
||||
case UnmapNotify:
|
||||
case DestroyNotify:
|
||||
if (e.xany.window == server.composite_manager) {
|
||||
// Stop real_transparency
|
||||
fprintf(stderr, "Detected compositor shutdown, restarting tint2...\n");
|
||||
signal_pending = SIGUSR1;
|
||||
|
||||
case PropertyNotify:
|
||||
event_property_notify(&e);
|
||||
break;
|
||||
}
|
||||
if (e.xany.window == g_tooltip.window || !systray_enabled)
|
||||
|
||||
case ConfigureNotify:
|
||||
event_configure_notify (e.xconfigure.window);
|
||||
break;
|
||||
for (it = systray.list_icons; it; it = g_slist_next(it)) {
|
||||
if (((TrayWindow*)it->data)->win == e.xany.window) {
|
||||
systray_destroy_event((TrayWindow*)it->data);
|
||||
|
||||
case ReparentNotify:
|
||||
if (!systray_enabled)
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case ClientMessage:
|
||||
ev = &e.xclient;
|
||||
if (ev->data.l[1] == server.atom._NET_WM_CM_S0) {
|
||||
if (ev->data.l[2] == None)
|
||||
panel = (Panel*)systray.area.panel;
|
||||
if (e.xany.window == panel->main_win) // reparented to us
|
||||
break;
|
||||
// FIXME: 'reparent to us' badly detected => disabled
|
||||
break;
|
||||
case UnmapNotify:
|
||||
case DestroyNotify:
|
||||
if (e.xany.window == server.composite_manager) {
|
||||
// Stop real_transparency
|
||||
signal_pending = SIGUSR1;
|
||||
else
|
||||
// Start real_transparency
|
||||
signal_pending = SIGUSR1;
|
||||
}
|
||||
if (systray_enabled && e.xclient.message_type == server.atom._NET_SYSTEM_TRAY_OPCODE && e.xclient.format == 32 && e.xclient.window == net_sel_win) {
|
||||
net_message(&e.xclient);
|
||||
}
|
||||
else if (e.xclient.message_type == server.atom.XdndEnter) {
|
||||
dnd_enter(&e.xclient);
|
||||
}
|
||||
else if (e.xclient.message_type == server.atom.XdndPosition) {
|
||||
dnd_position(&e.xclient);
|
||||
}
|
||||
else if (e.xclient.message_type == server.atom.XdndDrop) {
|
||||
dnd_drop(&e.xclient);
|
||||
}
|
||||
break;
|
||||
|
||||
case SelectionNotify:
|
||||
{
|
||||
Atom target = e.xselection.target;
|
||||
|
||||
fprintf(stderr, "DnD %s:%d: A selection notify has arrived!\n", __FILE__, __LINE__);
|
||||
fprintf(stderr, "DnD %s:%d: Requestor = %lu\n", __FILE__, __LINE__, e.xselectionrequest.requestor);
|
||||
fprintf(stderr, "DnD %s:%d: Selection atom = %s\n", __FILE__, __LINE__, GetAtomName(server.dsp, e.xselection.selection));
|
||||
fprintf(stderr, "DnD %s:%d: Target atom = %s\n", __FILE__, __LINE__, GetAtomName(server.dsp, target));
|
||||
fprintf(stderr, "DnD %s:%d: Property atom = %s\n", __FILE__, __LINE__, GetAtomName(server.dsp, e.xselection.property));
|
||||
|
||||
if (e.xselection.property != None && dnd_launcher_exec) {
|
||||
Property prop = read_property(server.dsp, dnd_target_window, dnd_selection);
|
||||
|
||||
//If we're being given a list of targets (possible conversions)
|
||||
if (target == server.atom.TARGETS && !dnd_sent_request) {
|
||||
dnd_sent_request = 1;
|
||||
dnd_atom = pick_target_from_targets(server.dsp, prop);
|
||||
|
||||
if (dnd_atom == None) {
|
||||
fprintf(stderr, "No matching datatypes.\n");
|
||||
} else {
|
||||
//Request the data type we are able to select
|
||||
fprintf(stderr, "Now requsting type %s", GetAtomName(server.dsp, dnd_atom));
|
||||
XConvertSelection(server.dsp, dnd_selection, dnd_atom, dnd_selection, dnd_target_window, CurrentTime);
|
||||
break;
|
||||
}
|
||||
if (e.xany.window == g_tooltip.window || !systray_enabled)
|
||||
break;
|
||||
for (it = systray.list_icons; it; it = g_slist_next(it)) {
|
||||
if (((TrayWindow*)it->data)->tray_id == e.xany.window) {
|
||||
remove_icon((TrayWindow*)it->data);
|
||||
break;
|
||||
}
|
||||
} else if (target == dnd_atom) {
|
||||
//Dump the binary data
|
||||
fprintf(stderr, "DnD %s:%d: Data begins:\n", __FILE__, __LINE__);
|
||||
fprintf(stderr, "--------\n");
|
||||
int i;
|
||||
for (i = 0; i < prop.nitems * prop.format/8; i++)
|
||||
fprintf(stderr, "%c", ((char*)prop.data)[i]);
|
||||
fprintf(stderr, "--------\n");
|
||||
}
|
||||
break;
|
||||
|
||||
int cmd_length = 0;
|
||||
cmd_length += 1; // (
|
||||
cmd_length += strlen(dnd_launcher_exec) + 1; // exec + space
|
||||
cmd_length += 1; // open double quotes
|
||||
for (i = 0; i < prop.nitems * prop.format/8; i++) {
|
||||
char c = ((char*)prop.data)[i];
|
||||
if (c == '\n') {
|
||||
if (i < prop.nitems * prop.format/8 - 1) {
|
||||
cmd_length += 3; // close double quotes, space, open double quotes
|
||||
}
|
||||
} else if (c == '\r') {
|
||||
case ClientMessage:
|
||||
ev = &e.xclient;
|
||||
if (ev->data.l[1] == server.atom._NET_WM_CM_S0) {
|
||||
if (ev->data.l[2] == None)
|
||||
// Stop real_transparency
|
||||
signal_pending = SIGUSR1;
|
||||
else
|
||||
// Start real_transparency
|
||||
signal_pending = SIGUSR1;
|
||||
}
|
||||
if (systray_enabled && e.xclient.message_type == server.atom._NET_SYSTEM_TRAY_OPCODE && e.xclient.format == 32 && e.xclient.window == net_sel_win) {
|
||||
net_message(&e.xclient);
|
||||
}
|
||||
else if (e.xclient.message_type == server.atom.XdndEnter) {
|
||||
dnd_enter(&e.xclient);
|
||||
}
|
||||
else if (e.xclient.message_type == server.atom.XdndPosition) {
|
||||
dnd_position(&e.xclient);
|
||||
}
|
||||
else if (e.xclient.message_type == server.atom.XdndDrop) {
|
||||
dnd_drop(&e.xclient);
|
||||
}
|
||||
break;
|
||||
|
||||
case SelectionNotify:
|
||||
{
|
||||
Atom target = e.xselection.target;
|
||||
|
||||
fprintf(stderr, "DnD %s:%d: A selection notify has arrived!\n", __FILE__, __LINE__);
|
||||
fprintf(stderr, "DnD %s:%d: Requestor = %lu\n", __FILE__, __LINE__, e.xselectionrequest.requestor);
|
||||
fprintf(stderr, "DnD %s:%d: Selection atom = %s\n", __FILE__, __LINE__, GetAtomName(server.dsp, e.xselection.selection));
|
||||
fprintf(stderr, "DnD %s:%d: Target atom = %s\n", __FILE__, __LINE__, GetAtomName(server.dsp, target));
|
||||
fprintf(stderr, "DnD %s:%d: Property atom = %s\n", __FILE__, __LINE__, GetAtomName(server.dsp, e.xselection.property));
|
||||
|
||||
if (e.xselection.property != None && dnd_launcher_exec) {
|
||||
Property prop = read_property(server.dsp, dnd_target_window, dnd_selection);
|
||||
|
||||
//If we're being given a list of targets (possible conversions)
|
||||
if (target == server.atom.TARGETS && !dnd_sent_request) {
|
||||
dnd_sent_request = 1;
|
||||
dnd_atom = pick_target_from_targets(server.dsp, prop);
|
||||
|
||||
if (dnd_atom == None) {
|
||||
fprintf(stderr, "No matching datatypes.\n");
|
||||
} else {
|
||||
cmd_length += 1; // 1 character
|
||||
if (c == '`' || c == '$' || c == '\\') {
|
||||
cmd_length += 1; // escape with one backslash
|
||||
//Request the data type we are able to select
|
||||
fprintf(stderr, "Now requsting type %s", GetAtomName(server.dsp, dnd_atom));
|
||||
XConvertSelection(server.dsp, dnd_selection, dnd_atom, dnd_selection, dnd_target_window, CurrentTime);
|
||||
}
|
||||
} else if (target == dnd_atom) {
|
||||
//Dump the binary data
|
||||
fprintf(stderr, "DnD %s:%d: Data begins:\n", __FILE__, __LINE__);
|
||||
fprintf(stderr, "--------\n");
|
||||
int i;
|
||||
for (i = 0; i < prop.nitems * prop.format/8; i++)
|
||||
fprintf(stderr, "%c", ((char*)prop.data)[i]);
|
||||
fprintf(stderr, "--------\n");
|
||||
|
||||
int cmd_length = 0;
|
||||
cmd_length += 1; // (
|
||||
cmd_length += strlen(dnd_launcher_exec) + 1; // exec + space
|
||||
cmd_length += 1; // open double quotes
|
||||
for (i = 0; i < prop.nitems * prop.format/8; i++) {
|
||||
char c = ((char*)prop.data)[i];
|
||||
if (c == '\n') {
|
||||
if (i < prop.nitems * prop.format/8 - 1) {
|
||||
cmd_length += 3; // close double quotes, space, open double quotes
|
||||
}
|
||||
} else if (c == '\r') {
|
||||
} else {
|
||||
cmd_length += 1; // 1 character
|
||||
if (c == '`' || c == '$' || c == '\\') {
|
||||
cmd_length += 1; // escape with one backslash
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
cmd_length += 1; // close double quotes
|
||||
cmd_length += 2; // &)
|
||||
cmd_length += 1; // terminator
|
||||
cmd_length += 1; // close double quotes
|
||||
cmd_length += 2; // &)
|
||||
cmd_length += 1; // terminator
|
||||
|
||||
char *cmd = calloc(cmd_length, 1);
|
||||
cmd[0] = '\0';
|
||||
strcat(cmd, "(");
|
||||
strcat(cmd, dnd_launcher_exec);
|
||||
strcat(cmd, " \"");
|
||||
for (i = 0; i < prop.nitems * prop.format/8; i++) {
|
||||
char c = ((char*)prop.data)[i];
|
||||
if (c == '\n') {
|
||||
if (i < prop.nitems * prop.format/8 - 1) {
|
||||
strcat(cmd, "\" \"");
|
||||
char *cmd = calloc(cmd_length, 1);
|
||||
cmd[0] = '\0';
|
||||
strcat(cmd, "(");
|
||||
strcat(cmd, dnd_launcher_exec);
|
||||
strcat(cmd, " \"");
|
||||
for (i = 0; i < prop.nitems * prop.format/8; i++) {
|
||||
char c = ((char*)prop.data)[i];
|
||||
if (c == '\n') {
|
||||
if (i < prop.nitems * prop.format/8 - 1) {
|
||||
strcat(cmd, "\" \"");
|
||||
}
|
||||
} else if (c == '\r') {
|
||||
} else {
|
||||
if (c == '`' || c == '$' || c == '\\') {
|
||||
strcat(cmd, "\\");
|
||||
}
|
||||
char sc[2];
|
||||
sc[0] = c;
|
||||
sc[1] = '\0';
|
||||
strcat(cmd, sc);
|
||||
}
|
||||
} else if (c == '\r') {
|
||||
} else {
|
||||
if (c == '`' || c == '$' || c == '\\') {
|
||||
strcat(cmd, "\\");
|
||||
}
|
||||
char sc[2];
|
||||
sc[0] = c;
|
||||
sc[1] = '\0';
|
||||
strcat(cmd, sc);
|
||||
}
|
||||
}
|
||||
strcat(cmd, "\"");
|
||||
strcat(cmd, "&)");
|
||||
fprintf(stderr, "DnD %s:%d: Running command: %s\n", __FILE__, __LINE__, cmd);
|
||||
tint_exec(cmd);
|
||||
free(cmd);
|
||||
strcat(cmd, "\"");
|
||||
strcat(cmd, "&)");
|
||||
fprintf(stderr, "DnD %s:%d: Running command: %s\n", __FILE__, __LINE__, cmd);
|
||||
tint_exec(cmd);
|
||||
free(cmd);
|
||||
|
||||
// Reply OK.
|
||||
XClientMessageEvent m;
|
||||
memset(&m, 0, sizeof(m));
|
||||
m.type = ClientMessage;
|
||||
m.display = server.dsp;
|
||||
m.window = dnd_source_window;
|
||||
m.message_type = server.atom.XdndFinished;
|
||||
m.format = 32;
|
||||
m.data.l[0] = dnd_target_window;
|
||||
m.data.l[1] = 1;
|
||||
m.data.l[2] = server.atom.XdndActionCopy; //We only ever copy.
|
||||
XSendEvent(server.dsp, dnd_source_window, False, NoEventMask, (XEvent*)&m);
|
||||
XSync(server.dsp, False);
|
||||
// Reply OK.
|
||||
XClientMessageEvent m;
|
||||
memset(&m, 0, sizeof(m));
|
||||
m.type = ClientMessage;
|
||||
m.display = server.dsp;
|
||||
m.window = dnd_source_window;
|
||||
m.message_type = server.atom.XdndFinished;
|
||||
m.format = 32;
|
||||
m.data.l[0] = dnd_target_window;
|
||||
m.data.l[1] = 1;
|
||||
m.data.l[2] = server.atom.XdndActionCopy; //We only ever copy.
|
||||
XSendEvent(server.dsp, dnd_source_window, False, NoEventMask, (XEvent*)&m);
|
||||
XSync(server.dsp, False);
|
||||
}
|
||||
|
||||
XFree(prop.data);
|
||||
}
|
||||
|
||||
XFree(prop.data);
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
if (e.type == XDamageNotify+damage_event) {
|
||||
XDamageNotifyEvent *de = (XDamageNotifyEvent*)&e;
|
||||
GSList *l;
|
||||
for (l = systray.list_icons; l ; l = l->next) {
|
||||
TrayWindow *traywin = (TrayWindow*)l->data;
|
||||
if (traywin->parent == de->drawable) {
|
||||
default:
|
||||
if (e.type == XDamageNotify+damage_event) {
|
||||
// union needed to avoid strict-aliasing warnings by gcc
|
||||
union { XEvent e; XDamageNotifyEvent de; } event_union = {.e=e};
|
||||
TrayWindow *traywin;
|
||||
GSList *l;
|
||||
XDamageNotifyEvent* de = &event_union.de;
|
||||
for (l = systray.list_icons; l ; l = l->next) {
|
||||
traywin = (TrayWindow*)l->data;
|
||||
if ( traywin->id == de->drawable ) {
|
||||
systray_render_icon(traywin);
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1464,6 +1430,7 @@ start:
|
||||
if (signal_pending == SIGUSR1) {
|
||||
// restart tint2
|
||||
// SIGUSR1 used when : user's signal, composite manager stop/start or xrandr
|
||||
FD_CLR (x11_fd, &fdset); // not sure if needed
|
||||
goto start;
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -20,7 +20,6 @@ include_directories( ../util
|
||||
${RSVG_INCLUDE_DIRS} )
|
||||
|
||||
set(SOURCES ../util/common.c
|
||||
../util/strnatcmp.c
|
||||
../config.c
|
||||
../server.c
|
||||
../launcher/apps-common.c
|
||||
@@ -57,17 +56,13 @@ target_link_libraries( tint2conf ${X11_T2C_LIBRARIES}
|
||||
${RSVG_LIBRARIES} )
|
||||
|
||||
if ( NOT DATADIR )
|
||||
set(DATADIR share)
|
||||
set( DATADIR share )
|
||||
endif( NOT DATADIR )
|
||||
|
||||
add_definitions( -DINSTALL_PREFIX=\"${CMAKE_INSTALL_PREFIX}\" )
|
||||
add_definitions( -DLOCALEDIR=\"${CMAKE_INSTALL_PREFIX}/${DATADIR}/locale\" )
|
||||
add_definitions( -DGETTEXT_PACKAGE=\"tint2conf\" )
|
||||
set_target_properties( tint2conf PROPERTIES COMPILE_FLAGS "-Wall -pthread" )
|
||||
set_target_properties( tint2conf PROPERTIES LINK_FLAGS "-pthread" )
|
||||
|
||||
add_subdirectory(po)
|
||||
|
||||
install( TARGETS tint2conf DESTINATION bin )
|
||||
install( FILES tint2conf.svg DESTINATION ${DATADIR}/icons/hicolor/scalable/apps )
|
||||
install( FILES tint2conf.desktop DESTINATION ${DATADIR}/applications )
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
**************************************************************************/
|
||||
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef HAVE_VERSION_H
|
||||
#include "version.h"
|
||||
@@ -66,7 +65,6 @@ static void menuImportDefault();
|
||||
static void menuSaveAs();
|
||||
static void menuDelete();
|
||||
static void edit_current_theme();
|
||||
static void set_current_theme();
|
||||
static void refresh_current_theme();
|
||||
static void menuAbout();
|
||||
static gboolean view_onPopupMenu(GtkWidget *treeview, gpointer userdata);
|
||||
@@ -112,7 +110,6 @@ static const char *global_ui =
|
||||
" </menubar>"
|
||||
" <toolbar name='ToolBar'>"
|
||||
" <toolitem action='ThemeProperties'/>"
|
||||
" <toolitem action='ThemeSelect'/>"
|
||||
" </toolbar>"
|
||||
" <popup name='ThemePopup'>"
|
||||
" <menuitem action='ThemeProperties'/>"
|
||||
@@ -122,20 +119,31 @@ static const char *global_ui =
|
||||
" </popup>"
|
||||
"</ui>";
|
||||
|
||||
|
||||
// define menubar and toolbar action
|
||||
static GtkActionEntry entries[] = {
|
||||
{"ThemeMenu", NULL, _("Theme"), NULL, NULL, NULL},
|
||||
{"ThemeAdd", GTK_STOCK_ADD, _("_Import theme..."), "<Control>N", _("Import theme"), G_CALLBACK(menuImport)},
|
||||
{"ThemeDefault", GTK_STOCK_NEW, _("_Import default theme..."), NULL, _("Import default theme"), G_CALLBACK(menuImportDefault)},
|
||||
{"ThemeSaveAs", GTK_STOCK_SAVE_AS, _("_Save as..."), NULL, _("Save theme as"), G_CALLBACK(menuSaveAs)},
|
||||
{"ThemeDelete", GTK_STOCK_DELETE, _("_Delete"), NULL, _("Delete theme"), G_CALLBACK(menuDelete)},
|
||||
{"ThemeProperties", GTK_STOCK_PROPERTIES, _("_Edit theme..."), NULL, _("Edit selected theme"), G_CALLBACK(edit_current_theme)},
|
||||
{"ThemeQuit", GTK_STOCK_QUIT, _("_Quit"), "<control>Q", _("Quit"), G_CALLBACK(gtk_main_quit)},
|
||||
{"EditMenu", NULL, "Edit", NULL, NULL, NULL},
|
||||
{"EditRefresh", GTK_STOCK_REFRESH, _("Refresh"), NULL, _("Refresh"), G_CALLBACK(refresh_current_theme)},
|
||||
{"EditRefreshAll", GTK_STOCK_REFRESH, _("Refresh all"), NULL, _("Refresh all"), G_CALLBACK(load_all_themes)},
|
||||
{"HelpMenu", NULL, _("Help"), NULL, NULL, NULL},
|
||||
{"HelpAbout", GTK_STOCK_ABOUT, _("_About"), "<Control>A", _("About"), G_CALLBACK(menuAbout)}
|
||||
};
|
||||
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
|
||||
bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
|
||||
textdomain(GETTEXT_PACKAGE);
|
||||
|
||||
GtkWidget *vBox = NULL, *scrollbar = NULL;
|
||||
GtkActionGroup *actionGroup;
|
||||
|
||||
gtk_init(&argc, &argv);
|
||||
|
||||
#if !GLIB_CHECK_VERSION(2, 31, 0)
|
||||
g_thread_init(NULL);
|
||||
#endif
|
||||
g_thread_init((NULL));
|
||||
|
||||
{
|
||||
gchar *tint2_config_dir = g_build_filename(g_get_user_config_dir(), "tint2", NULL);
|
||||
@@ -159,24 +167,6 @@ int main(int argc, char **argv)
|
||||
gtk_container_add(GTK_CONTAINER(g_window), vBox);
|
||||
|
||||
actionGroup = gtk_action_group_new("menuActionGroup");
|
||||
|
||||
// Menubar and toolbar entries
|
||||
GtkActionEntry entries[] = {
|
||||
{"ThemeMenu", NULL, _("Theme"), NULL, NULL, NULL},
|
||||
{"ThemeAdd", GTK_STOCK_ADD, _("_Import theme..."), "<Control>N", _("Import theme"), G_CALLBACK(menuImport)},
|
||||
{"ThemeDefault", GTK_STOCK_NEW, _("_Import default theme..."), NULL, _("Import default theme"), G_CALLBACK(menuImportDefault)},
|
||||
{"ThemeSaveAs", GTK_STOCK_SAVE_AS, _("_Save as..."), NULL, _("Save theme as"), G_CALLBACK(menuSaveAs)},
|
||||
{"ThemeDelete", GTK_STOCK_DELETE, _("_Delete"), NULL, _("Delete theme"), G_CALLBACK(menuDelete)},
|
||||
{"ThemeProperties", GTK_STOCK_PROPERTIES, _("_Edit theme..."), NULL, _("Edit selected theme"), G_CALLBACK(edit_current_theme)},
|
||||
{"ThemeSelect", GTK_STOCK_APPLY, _("_Make default"), NULL, _("Replace the default theme with the selected one"), G_CALLBACK(set_current_theme)},
|
||||
{"ThemeQuit", GTK_STOCK_QUIT, _("_Quit"), "<control>Q", _("Quit"), G_CALLBACK(gtk_main_quit)},
|
||||
{"EditMenu", NULL, _("Edit"), NULL, NULL, NULL},
|
||||
{"EditRefresh", GTK_STOCK_REFRESH, _("Refresh"), NULL, _("Refresh"), G_CALLBACK(refresh_current_theme)},
|
||||
{"EditRefreshAll", GTK_STOCK_REFRESH, _("Refresh all"), NULL, _("Refresh all"), G_CALLBACK(load_all_themes)},
|
||||
{"HelpMenu", NULL, _("Help"), NULL, NULL, NULL},
|
||||
{"HelpAbout", GTK_STOCK_ABOUT, _("_About"), "<Control>A", _("About"), G_CALLBACK(menuAbout)}
|
||||
};
|
||||
|
||||
gtk_action_group_add_actions(actionGroup, entries, G_N_ELEMENTS(entries), NULL);
|
||||
globalUIManager = gtk_ui_manager_new();
|
||||
gtk_ui_manager_insert_action_group(globalUIManager, actionGroup, 0);
|
||||
@@ -489,33 +479,6 @@ static void edit_current_theme()
|
||||
}
|
||||
}
|
||||
|
||||
static void set_current_theme()
|
||||
{
|
||||
GtkTreeSelection *sel;
|
||||
GtkTreeIter iter;
|
||||
GtkTreeModel *model;
|
||||
gchar *file;
|
||||
|
||||
sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(g_theme_view));
|
||||
if (gtk_tree_selection_get_selected(GTK_TREE_SELECTION(sel), &model, &iter)) {
|
||||
gtk_tree_model_get(model, &iter, COL_THEME_FILE, &file, -1);
|
||||
// config_read_file(file);
|
||||
|
||||
gchar *main_file = g_build_filename(g_get_user_config_dir(), "tint2", "tint2rc", NULL);
|
||||
{
|
||||
gchar *backup_path = g_strdup_printf("%s.backup.%ld", main_file, time(NULL));
|
||||
copy_file(main_file, backup_path);
|
||||
g_free(backup_path);
|
||||
}
|
||||
copy_file(file, main_file);
|
||||
int unused = system("killall -SIGUSR1 tint2 || pkill -SIGUSR1 -x tint2");
|
||||
(void)unused;
|
||||
g_free(file);
|
||||
select_first_theme();
|
||||
refresh_current_theme();
|
||||
}
|
||||
}
|
||||
|
||||
static void viewRowActivated(GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data)
|
||||
{
|
||||
edit_current_theme();
|
||||
@@ -523,56 +486,8 @@ static void viewRowActivated(GtkTreeView *tree_view, GtkTreePath *path, GtkTreeV
|
||||
|
||||
// ====== Theme load/reload ======
|
||||
|
||||
static void copy_default_themes()
|
||||
{
|
||||
gchar *path_home = g_build_filename(g_get_user_config_dir(), "tint2", "tint2rc", NULL);
|
||||
if (!g_file_test(path_home, G_FILE_TEST_EXISTS)) {
|
||||
const gchar * const * system_dirs = g_get_system_config_dirs();
|
||||
int i;
|
||||
for (i = 0; system_dirs[i]; i++) {
|
||||
gchar *path = g_build_filename(system_dirs[i], "tint2", "tint2rc", NULL);
|
||||
if (g_file_test(path, G_FILE_TEST_EXISTS)) {
|
||||
copy_file(path, path_home);
|
||||
}
|
||||
g_free(path);
|
||||
}
|
||||
}
|
||||
g_free(path_home);
|
||||
|
||||
const gchar * const * data_dirs = g_get_system_data_dirs();
|
||||
int i;
|
||||
for (i = 0; data_dirs[i]; i++) {
|
||||
gchar *path_tint2 = g_build_filename(data_dirs[i], "tint2", NULL);
|
||||
fprintf(stderr, "%s\n", path_tint2);
|
||||
GDir *dir = g_dir_open(path_tint2, 0, NULL);
|
||||
if (dir) {
|
||||
const gchar *file_name;
|
||||
while ((file_name = g_dir_read_name(dir))) {
|
||||
if (!g_file_test(file_name, G_FILE_TEST_IS_DIR) &&
|
||||
!strstr(file_name, "backup") &&
|
||||
!strstr(file_name, "copy") &&
|
||||
!strstr(file_name, "~") &&
|
||||
(endswith(file_name, "tint2rc") ||
|
||||
endswith(file_name, ".conf"))) {
|
||||
gchar *path_home = g_build_filename(g_get_user_config_dir(), "tint2", file_name, NULL);
|
||||
if (!g_file_test(path_home, G_FILE_TEST_EXISTS)) {
|
||||
gchar *path_usr = g_build_filename(path_tint2, file_name, NULL);
|
||||
copy_file(path_usr, path_home);
|
||||
g_free(path_usr);
|
||||
}
|
||||
g_free(path_home);
|
||||
}
|
||||
}
|
||||
g_dir_close(dir);
|
||||
}
|
||||
g_free(path_tint2);
|
||||
}
|
||||
}
|
||||
|
||||
static void load_all_themes()
|
||||
{
|
||||
copy_default_themes();
|
||||
|
||||
gtk_list_store_clear(GTK_LIST_STORE(g_store));
|
||||
|
||||
gchar *tint2_config_dir = g_build_filename(g_get_user_config_dir(), "tint2", NULL);
|
||||
@@ -582,7 +497,6 @@ static void load_all_themes()
|
||||
return;
|
||||
}
|
||||
gboolean found_theme = FALSE;
|
||||
|
||||
const gchar *file_name;
|
||||
while ((file_name = g_dir_read_name(dir))) {
|
||||
if (!g_file_test(file_name, G_FILE_TEST_IS_DIR) &&
|
||||
@@ -598,7 +512,12 @@ static void load_all_themes()
|
||||
}
|
||||
}
|
||||
|
||||
if (found_theme) {
|
||||
if (!found_theme) {
|
||||
gchar *path_tint2rc = g_build_filename (g_get_user_config_dir(), "tint2", "tint2rc", NULL);
|
||||
copy_file(get_default_config_path(), path_tint2rc);
|
||||
g_free(path_tint2rc);
|
||||
load_all_themes();
|
||||
} else {
|
||||
select_first_theme();
|
||||
|
||||
GtkTreeIter iter;
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#include <glib/gi18n-lib.h>
|
||||
#else
|
||||
#define _(String) String
|
||||
#define GETTEXT_PACKAGE "tint2conf"
|
||||
#endif
|
||||
|
||||
#define SNAPSHOT_TICK 190
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
include(FindGettext)
|
||||
if (GETTEXT_FOUND)
|
||||
set(GETTEXT_PACKAGE tint2conf)
|
||||
file(GLOB POTFILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.po")
|
||||
string(REPLACE ".po" " " LANGUAGES ${POTFILES})
|
||||
message(STATUS "gettext found languages: ${LANGUAGES}")
|
||||
string(REPLACE " " ";" LANGUAGES ${LANGUAGES})
|
||||
if ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_LESS "2.8.8")
|
||||
GETTEXT_CREATE_TRANSLATIONS("${CMAKE_CURRENT_SOURCE_DIR}/tint2conf.pot" ALL ${POTFILES})
|
||||
else()
|
||||
foreach(LANG ${LANGUAGES})
|
||||
GETTEXT_PROCESS_PO_FILES(${LANG} ALL PO_FILES ${LANG}.po)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${LANG}.gmo"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/${DATADIR}/locale/${LANG}/LC_MESSAGES"
|
||||
RENAME "${GETTEXT_PACKAGE}.mo")
|
||||
endforeach ()
|
||||
endif()
|
||||
else ()
|
||||
message(STATUS "gettext not found")
|
||||
endif ()
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,11 +0,0 @@
|
||||
Updating pot file:
|
||||
|
||||
find .. -name '*.c' | xargs xgettext --keyword=_ --language=C --output=updated.pot -
|
||||
|
||||
Followed by manual editing of updated.pot to make sure the header is OK. Then:
|
||||
|
||||
cat updated.pot > tint2conf.pot && rm -f updated.pot
|
||||
|
||||
Then update the po files:
|
||||
|
||||
for f in *.po ; do lang=$(basename $f .po); echo $lang ; msgmerge -i -o $lang.pox $lang.po tint2conf.pot ; cat ${lang}.pox > ${lang}.po ; rm ${lang}.pox ; done
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -51,7 +51,7 @@ extern GtkWidget *taskbar_hide_inactive_tasks, *taskbar_hide_diff_monitor;
|
||||
extern GtkWidget *taskbar_name_padding_x, *taskbar_name_padding_y, *taskbar_name_inactive_color, *taskbar_name_active_color, *taskbar_name_font;
|
||||
extern GtkWidget *taskbar_active_background, *taskbar_inactive_background;
|
||||
extern GtkWidget *taskbar_name_active_background, *taskbar_name_inactive_background;
|
||||
extern GtkWidget *taskbar_distribute_size, *taskbar_sort_order, *taskbar_alignment;
|
||||
extern GtkWidget *taskbar_distribute_size, *taskbar_sort_order;
|
||||
|
||||
// task
|
||||
extern GtkWidget *task_mouse_left, *task_mouse_middle, *task_mouse_right, *task_mouse_scroll_up, *task_mouse_scroll_down;
|
||||
|
||||
@@ -272,16 +272,6 @@ void config_write_taskbar(FILE *fp)
|
||||
}
|
||||
fprintf(fp, "\n");
|
||||
|
||||
fprintf(fp, "task_align = ");
|
||||
if (gtk_combo_box_get_active(GTK_COMBO_BOX(taskbar_alignment)) <= 0) {
|
||||
fprintf(fp, "left");
|
||||
} else if (gtk_combo_box_get_active(GTK_COMBO_BOX(taskbar_alignment)) == 1) {
|
||||
fprintf(fp, "center");
|
||||
} else {
|
||||
fprintf(fp, "right");
|
||||
}
|
||||
fprintf(fp, "\n");
|
||||
|
||||
fprintf(fp, "\n");
|
||||
}
|
||||
|
||||
@@ -511,7 +501,7 @@ void config_write_launcher(FILE *fp)
|
||||
g_strstrip(dir);
|
||||
if (strlen(dir) > 0) {
|
||||
char *contracted = contract_tilde(dir);
|
||||
fprintf(fp, "launcher_apps_dir = %s\n", contracted);
|
||||
fprintf(fp, "launcher_item_app = %s\n", contracted);
|
||||
free(contracted);
|
||||
}
|
||||
}
|
||||
@@ -1008,16 +998,6 @@ void add_entry(char *key, char *value)
|
||||
else
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(taskbar_sort_order), 0);
|
||||
}
|
||||
else if (strcmp(key, "task_align") == 0) {
|
||||
if (strcmp(value, "left") == 0)
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(taskbar_alignment), 0);
|
||||
else if (strcmp(value, "center") == 0)
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(taskbar_alignment), 1);
|
||||
else if (strcmp(value, "right") == 0)
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(taskbar_alignment), 2);
|
||||
else
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(taskbar_alignment), 0);
|
||||
}
|
||||
else if (strcmp(key, "taskbar_padding") == 0) {
|
||||
extract_values(value, &value1, &value2, &value3);
|
||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(taskbar_padding_x), atoi(value1));
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
|
||||
|
||||
#include "main.h"
|
||||
#include "strnatcmp.h"
|
||||
#include "theme_view.h"
|
||||
|
||||
// The data columns that we export via the tree model interface
|
||||
@@ -28,11 +27,6 @@ GtkListStore *g_store;
|
||||
int g_width_list, g_height_list;
|
||||
GtkCellRenderer *g_renderer;
|
||||
|
||||
gint theme_name_compare(GtkTreeModel *model,
|
||||
GtkTreeIter *a,
|
||||
GtkTreeIter *b,
|
||||
gpointer user_data);
|
||||
|
||||
GtkWidget *create_view()
|
||||
{
|
||||
GtkTreeViewColumn *col;
|
||||
@@ -75,50 +69,21 @@ GtkWidget *create_view()
|
||||
GtkTreeSortable *sortable;
|
||||
sortable = GTK_TREE_SORTABLE(g_store);
|
||||
gtk_tree_sortable_set_sort_column_id(sortable, COL_THEME_FILE, GTK_SORT_ASCENDING);
|
||||
gtk_tree_sortable_set_sort_func(sortable, COL_THEME_FILE, theme_name_compare, NULL, NULL);
|
||||
return view;
|
||||
}
|
||||
|
||||
gint theme_name_compare(GtkTreeModel *model,
|
||||
GtkTreeIter *a,
|
||||
GtkTreeIter *b,
|
||||
gpointer user_data)
|
||||
{
|
||||
gchar *path_a, *path_b;
|
||||
gtk_tree_model_get(model, a, COL_THEME_FILE, &path_a, -1);
|
||||
gtk_tree_model_get(model, b, COL_THEME_FILE, &path_b, -1);
|
||||
gchar *name_a = path_a;
|
||||
gchar *p;
|
||||
for (p = name_a; *p; p++) {
|
||||
if (*p == '/')
|
||||
name_a = p + 1;
|
||||
}
|
||||
gchar *name_b = path_b;
|
||||
for (p = name_b; *p; p++) {
|
||||
if (*p == '/')
|
||||
name_b = p + 1;
|
||||
}
|
||||
if (g_str_equal(name_a, name_b))
|
||||
return 0;
|
||||
if (g_str_equal(name_a, "tint2rc"))
|
||||
return -1;
|
||||
if (g_str_equal(name_b, "tint2rc"))
|
||||
return 1;
|
||||
gint result = strnatcasecmp(name_a, name_b);
|
||||
g_free(path_a);
|
||||
g_free(path_b);
|
||||
return result;
|
||||
}
|
||||
|
||||
void custom_list_append(const gchar *path)
|
||||
void custom_list_append(const gchar *name)
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
|
||||
gtk_list_store_append(g_store, &iter);
|
||||
gtk_list_store_set(g_store, &iter, COL_THEME_FILE, path, -1);
|
||||
gtk_list_store_set(g_store, &iter, COL_THEME_FILE, name, -1);
|
||||
|
||||
gchar *name = g_strdup(strrchr(path, '/') + 1);
|
||||
gtk_list_store_set(g_store, &iter, COL_THEME_NAME, name, -1);
|
||||
gchar *b, *n;
|
||||
b = strrchr(name, '/');
|
||||
n = g_strdup(b+1);
|
||||
gtk_list_store_set(g_store, &iter, COL_THEME_NAME, n, -1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ enum { COL_THEME_FILE = 0, COL_THEME_NAME, COL_SNAPSHOT, NB_COL, };
|
||||
|
||||
GtkWidget *create_view();
|
||||
|
||||
void custom_list_append(const gchar *path);
|
||||
void custom_list_append(const gchar *name);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ Name[nb]=Panelbehandler
|
||||
Name[nl]=Paneel Manager
|
||||
Name[nn]=Panelhandsamar
|
||||
Name[pa]=ਪੈਨਲ ਮੈਨੇਜਰ
|
||||
Name[pl]=Ustawienia panelu
|
||||
Name[pl]=Panel
|
||||
Name[pt]=Gestor do Painel
|
||||
Name[pt_BR]=Gerenciador do painel
|
||||
Name[ro]=Manager de panouri
|
||||
|
||||
2153
src/tint2conf/tintwizard.py
Executable file
2153
src/tint2conf/tintwizard.py
Executable file
File diff suppressed because it is too large
Load Diff
@@ -141,6 +141,12 @@ void size_by_layout (Area *a, int level)
|
||||
if (!a->on_screen)
|
||||
return;
|
||||
|
||||
if (a == &panel1->taskbar[0]) {
|
||||
printf("%s %d: Taskbar 0: y=%d, h=%d, b=%d\n", __FUNCTION__, __LINE__, a->posy, a->height, a->posy + a->height);
|
||||
} else if (a == &panel1->taskbar[1]) {
|
||||
printf("%s %d: Taskbar 1: y=%d, h=%d, b=%d\n", __FUNCTION__, __LINE__, a->posy, a->height, a->posy + a->height);
|
||||
}
|
||||
|
||||
// parent node is resized before its children
|
||||
// calculate area's size
|
||||
GList *l;
|
||||
@@ -216,21 +222,21 @@ void size_by_layout (Area *a, int level)
|
||||
}
|
||||
} else if (a->alignment == ALIGN_CENTER) {
|
||||
|
||||
int children_size = 0;
|
||||
int children_size = 0;
|
||||
|
||||
for (l = a->list; l ; l = l->next) {
|
||||
for (l = a->list; l ; l = l->next) {
|
||||
Area *child = ((Area*)l->data);
|
||||
if (!child->on_screen)
|
||||
continue;
|
||||
|
||||
children_size += panel_horizontal ? child->width : child->height;
|
||||
children_size += (l == a->list) ? 0 : a->paddingx;
|
||||
children_size += (l == a->list) ? 0 : a->paddingx;
|
||||
}
|
||||
|
||||
int pos = (panel_horizontal ? a->posx : a->posy) + a->bg->border.width + a->paddingxlr;
|
||||
pos += ((panel_horizontal ? a->width : a->height) - children_size) / 2;
|
||||
int pos = (panel_horizontal ? a->posx : a->posy) + a->bg->border.width + a->paddingxlr;
|
||||
pos += ((panel_horizontal ? a->width : a->height) - children_size) / 2;
|
||||
|
||||
for (l = a->list; l ; l = l->next) {
|
||||
for (l = a->list; l ; l = l->next) {
|
||||
Area *child = ((Area*)l->data);
|
||||
if (!child->on_screen)
|
||||
continue;
|
||||
@@ -274,7 +280,7 @@ void refresh (Area *a)
|
||||
if (a->redraw) {
|
||||
a->redraw = 0;
|
||||
// force redraw of child
|
||||
//GList *l;
|
||||
//GSList *l;
|
||||
//for (l = a->list ; l ; l = l->next)
|
||||
//((Area*)l->data)->redraw = 1;
|
||||
|
||||
@@ -372,6 +378,11 @@ int resize_by_layout(void *obj, int maximum_size)
|
||||
if (child->on_screen && child->size_mode == SIZE_BY_LAYOUT) {
|
||||
int old_height = child->height;
|
||||
child->height = height;
|
||||
if (child == &panel1->taskbar[0]) {
|
||||
printf("Taskbar 0: y=%d, h=%d, b=%d\n", child->posy, child->height, child->posy + child->height);
|
||||
} else if (child == &panel1->taskbar[1]) {
|
||||
printf("Taskbar 1: y=%d, h=%d, b=%d\n", child->posy, child->height, child->posy + child->height);
|
||||
}
|
||||
if (modulo) {
|
||||
child->height++;
|
||||
modulo--;
|
||||
|
||||
@@ -51,6 +51,7 @@ typedef struct
|
||||
// SIZE_BY_LAYOUT objects : taskbar and task
|
||||
// SIZE_BY_CONTENT objects : clock, battery, launcher, systray
|
||||
enum { SIZE_BY_LAYOUT, SIZE_BY_CONTENT };
|
||||
|
||||
enum { ALIGN_LEFT = 0, ALIGN_CENTER = 1, ALIGN_RIGHT = 2 };
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -35,9 +35,6 @@
|
||||
|
||||
void copy_file(const char *pathSrc, const char *pathDest)
|
||||
{
|
||||
if (g_str_equal(pathSrc, pathDest))
|
||||
return;
|
||||
|
||||
FILE *fileSrc, *fileDest;
|
||||
char buffer[100];
|
||||
int nb;
|
||||
@@ -120,13 +117,13 @@ char *contract_tilde(char *s)
|
||||
if (!home)
|
||||
return strdup(s);
|
||||
|
||||
char *home_slash = calloc(strlen(home) + 2, 1);
|
||||
char *home_slash = calloc(strlen(home) + 1, 1);
|
||||
strcat(home_slash, home);
|
||||
strcat(home_slash, "/");
|
||||
|
||||
if ((strcmp(s, home) == 0 ||
|
||||
strstr(s, home_slash) == s)) {
|
||||
char *result = calloc(strlen(s) - strlen(home) + 2, 1);
|
||||
char *result = calloc(strlen(s) - strlen(home) + 1, 1);
|
||||
strcat(result, "~");
|
||||
strcat(result, s + strlen(home));
|
||||
free(home_slash);
|
||||
@@ -365,42 +362,6 @@ void createHeuristicMask(DATA32* data, int w, int h)
|
||||
}
|
||||
}
|
||||
|
||||
int pixelEmpty(DATA32 argb)
|
||||
{
|
||||
|
||||
DATA32 a = (argb >> 24) & 0xff;
|
||||
if (a == 0)
|
||||
return 1;
|
||||
|
||||
DATA32 rgb = argb & 0xffFFff;
|
||||
return rgb == 0;
|
||||
}
|
||||
|
||||
int imageEmpty(DATA32* data, int w, int h)
|
||||
{
|
||||
unsigned int x, y;
|
||||
|
||||
if (w > 0 && h > 0) {
|
||||
x = w / 2;
|
||||
y = h / 2;
|
||||
if (!pixelEmpty(data[y * w + x])) {
|
||||
//fprintf(stderr, "Non-empty pixel: [%u, %u] = %x\n", x, y, data[y * w + x]);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
for (y = 0; y < h; y++) {
|
||||
for (x = 0; x < w; x++) {
|
||||
if (!pixelEmpty(data[y * w + x])) {
|
||||
//fprintf(stderr, "Non-empty pixel: [%u, %u] = %x\n", x, y, data[y * w + x]);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//fprintf(stderr, "All pixels are empty\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
void render_image(Drawable d, int x, int y)
|
||||
{
|
||||
|
||||
@@ -12,12 +12,6 @@
|
||||
#include <pango/pangocairo.h>
|
||||
#include "area.h"
|
||||
|
||||
#define GREEN "\033[1;32m"
|
||||
#define YELLOW "\033[1;33m"
|
||||
#define RED "\033[31m"
|
||||
#define BLUE "\033[1;34m"
|
||||
#define RESET "\033[0m"
|
||||
|
||||
/*
|
||||
void fxfree(void** ptr){
|
||||
if(*ptr){
|
||||
@@ -68,7 +62,6 @@ void extract_values (const char *value, char **value1, char **value2, char **val
|
||||
// alpha from 0 to 100, satur from 0 to 1, bright from 0 to 1.
|
||||
void adjust_asb(DATA32 *data, int w, int h, int alpha, float satur, float bright);
|
||||
void createHeuristicMask(DATA32* data, int w, int h);
|
||||
int imageEmpty(DATA32* data, int w, int h);
|
||||
|
||||
void render_image(Drawable d, int x, int y);
|
||||
|
||||
|
||||
@@ -49,7 +49,9 @@ struct _timeout {
|
||||
|
||||
void add_timeout_intern(int value_msec, int interval_msec, void(*_callback)(void*), void* arg, timeout* t);
|
||||
gint compare_timeouts(gconstpointer t1, gconstpointer t2);
|
||||
gint compare_timespecs(const struct timespec* t1, const struct timespec* t2);
|
||||
int timespec_subtract(struct timespec* result, struct timespec* x, struct timespec* y);
|
||||
struct timespec add_msec_to_timespec(struct timespec ts, int msec);
|
||||
|
||||
|
||||
int align_with_existing_timeouts(timeout* t);
|
||||
@@ -393,13 +395,8 @@ void callback_multi_timeout(void* arg)
|
||||
timeout* t = it->data;
|
||||
if (++t->multi_timeout->current_count >= t->multi_timeout->count_to_expiration) {
|
||||
t->_callback(t->arg);
|
||||
if (multi_timeouts && g_hash_table_lookup(multi_timeouts, t)) {
|
||||
// Timer still exists
|
||||
t->multi_timeout->current_count = 0;
|
||||
t->timeout_expires = add_msec_to_timespec(cur_time, t->interval_msec);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
t->multi_timeout->current_count = 0;
|
||||
t->timeout_expires = add_msec_to_timespec(cur_time, t->interval_msec);
|
||||
}
|
||||
it = it->next;
|
||||
}
|
||||
@@ -450,16 +447,3 @@ void stop_multi_timeout(timeout* t)
|
||||
}
|
||||
free(mth);
|
||||
}
|
||||
|
||||
double profiling_get_time_old_time = 0;
|
||||
double profiling_get_time()
|
||||
{
|
||||
struct timespec cur_time;
|
||||
clock_gettime(CLOCK_MONOTONIC, &cur_time);
|
||||
double t = cur_time.tv_sec + cur_time.tv_nsec * 1.0e-9;
|
||||
if (profiling_get_time_old_time == 0)
|
||||
profiling_get_time_old_time = t;
|
||||
double delta = t - profiling_get_time_old_time;
|
||||
profiling_get_time_old_time = t;
|
||||
return delta;
|
||||
}
|
||||
|
||||
@@ -20,8 +20,6 @@
|
||||
#define TIMER_H
|
||||
|
||||
#include <glib.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
extern struct timeval next_timeout;
|
||||
|
||||
@@ -68,14 +66,4 @@ void update_next_timeout();
|
||||
/** Callback of all expired timeouts **/
|
||||
void callback_timeout_expired();
|
||||
|
||||
/** Returns -1 if t1 < t2, 0 if t1 == t2, 1 if t1 > t2 **/
|
||||
gint compare_timespecs(const struct timespec* t1, const struct timespec* t2);
|
||||
|
||||
struct timespec add_msec_to_timespec(struct timespec ts, int msec);
|
||||
|
||||
/** Returns the time difference in seconds between the current time and the last time this function was called.
|
||||
* At the first call returns zero.
|
||||
**/
|
||||
double profiling_get_time();
|
||||
|
||||
#endif // TIMER_H
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
// ADD PREDEFINED MACROS HERE!
|
||||
#define HAVE_RSVG 1
|
||||
#define HAVE_SN 1
|
||||
#define ENABLE_BATTERY 1
|
||||
@@ -1 +0,0 @@
|
||||
[General]
|
||||
@@ -2,7 +2,7 @@
|
||||
Type=Application
|
||||
Encoding=UTF-8
|
||||
Name=Tint2 panel
|
||||
Name[am]=ፓነል tint2
|
||||
Name[am]=ፓነል tint2
|
||||
Name[ar]=الشريط tint2
|
||||
Name[ast]=Panel tint2
|
||||
Name[be]=Панэль tint2
|
||||
@@ -12,7 +12,7 @@ Name[da]=Panel tint2
|
||||
Name[de]=Leiste tint2
|
||||
Name[dz]=པེ་ནཱལ། tint2
|
||||
Name[el]=Ταμπλό tint2
|
||||
Name[en]=Tint2 panel
|
||||
Name[en_GB]=Panel tint2
|
||||
Name[eo]=Panelo tint2
|
||||
Name[es]=Panel tint2
|
||||
Name[et]=Ääreriba tint2
|
||||
@@ -36,6 +36,7 @@ Name[nn]=Panel tint2
|
||||
Name[pa]=ਪੈਨਲ tint2
|
||||
Name[pl]=Panel tint2
|
||||
Name[pt]=Painel tint2
|
||||
Name[pt_BR]=Painel tint2
|
||||
Name[ro]=Panou tint2
|
||||
Name[ru]=Панель tint2
|
||||
Name[si]=පුවරුව tint2
|
||||
@@ -47,11 +48,12 @@ Name[tr]=Panel tint2
|
||||
Name[ug]=panel tint2
|
||||
Name[uk]=Панель tint2
|
||||
Name[ur]=پینل tint2
|
||||
Name[ur_PK]=پینل tint2
|
||||
Name[vi]=Panel tint2
|
||||
Name[zh]=面板 tint2
|
||||
Name[zh_CN]=面板 tint2
|
||||
Name[zh_TW]=面板 tint2
|
||||
Comment=Lightweight panel
|
||||
Comment[fr]=Panel léger
|
||||
Comment[pl]=Lekki panel
|
||||
Comment[fr_FR]=Panel léger
|
||||
Exec=tint2
|
||||
Icon=taskbar
|
||||
Terminal=false
|
||||
|
||||
153
tint2.files
153
tint2.files
@@ -1,153 +0,0 @@
|
||||
doc/tint2.1
|
||||
sample/icon_and_text_1.tint2rc
|
||||
sample/icon_and_text_2.tint2rc
|
||||
sample/icon_and_text_3.tint2rc
|
||||
sample/icon_and_text_4.tint2rc
|
||||
sample/icon_only_1.tint2rc
|
||||
sample/icon_only_2.tint2rc
|
||||
sample/icon_only_3.tint2rc
|
||||
sample/icon_only_4.tint2rc
|
||||
sample/icon_only_6.tint2rc
|
||||
sample/icon_only_7.tint2rc
|
||||
sample/text_only_1.tint2rc
|
||||
sample/text_only_2.tint2rc
|
||||
sample/text_only_3.tint2rc
|
||||
sample/text_only_4.tint2rc
|
||||
sample/text_only_5.tint2rc
|
||||
sample/text_only_6.tint2rc
|
||||
sample/tint2rc
|
||||
src/battery/battery.c
|
||||
src/battery/battery.h
|
||||
src/clock/clock.c
|
||||
src/clock/clock.h
|
||||
src/execplugin/execplugin.c
|
||||
src/execplugin/execplugin.h
|
||||
src/launcher/launcher.c
|
||||
src/launcher/launcher.h
|
||||
src/launcher/xsettings-client.c
|
||||
src/launcher/xsettings-client.h
|
||||
src/launcher/xsettings-common.c
|
||||
src/launcher/xsettings-common.h
|
||||
src/sysmon/sysmon.c
|
||||
src/sysmon/sysmon.h
|
||||
src/systray/systraybar.c
|
||||
src/systray/systraybar.h
|
||||
src/taskbar/task.c
|
||||
src/taskbar/task.h
|
||||
src/taskbar/taskbar.c
|
||||
src/taskbar/taskbar.h
|
||||
src/taskbar/taskbarname.c
|
||||
src/taskbar/taskbarname.h
|
||||
src/tint2conf/CMakeLists.txt
|
||||
src/tint2conf/main.c
|
||||
src/tint2conf/main.h
|
||||
src/tint2conf/properties.c
|
||||
src/tint2conf/properties.h
|
||||
src/tint2conf/properties_rw.c
|
||||
src/tint2conf/properties_rw.h
|
||||
src/tint2conf/taskbar.svg
|
||||
src/tint2conf/theme_view.c
|
||||
src/tint2conf/theme_view.h
|
||||
src/tint2conf/tint2conf.desktop
|
||||
src/tint2conf/tintwizard.py
|
||||
src/tooltip/tooltip.c
|
||||
src/tooltip/tooltip.h
|
||||
src/util/area.c
|
||||
src/util/area.h
|
||||
src/util/blur.c
|
||||
src/util/blur.h
|
||||
src/util/common.c
|
||||
src/util/common.h
|
||||
src/util/timer.c
|
||||
src/util/timer.h
|
||||
src/util/window.c
|
||||
src/util/window.h
|
||||
src/config.c
|
||||
src/config.h
|
||||
src/panel.c
|
||||
src/panel.h
|
||||
src/server.c
|
||||
src/server.h
|
||||
src/tint.c
|
||||
AUTHORS
|
||||
ChangeLog
|
||||
CMakeLists.txt
|
||||
COPYING
|
||||
default_icon.png
|
||||
get_svnrev.sh
|
||||
INSTALL.txt
|
||||
make_release.sh
|
||||
README
|
||||
README.source
|
||||
src/launcher/apps-common.c
|
||||
src/launcher/apps-common.h
|
||||
src/launcher/icon-theme-common.c
|
||||
src/launcher/icon-theme-common.h
|
||||
src/util/strnatcmp.c
|
||||
src/util/strnatcmp.h
|
||||
get_version.sh
|
||||
src/battery/battery.c
|
||||
src/battery/battery.h
|
||||
src/clock/clock.c
|
||||
src/clock/clock.h
|
||||
src/launcher/apps-common.c
|
||||
src/launcher/apps-common.h
|
||||
src/launcher/icon-theme-common.c
|
||||
src/launcher/icon-theme-common.h
|
||||
src/launcher/launcher.c
|
||||
src/launcher/launcher.h
|
||||
src/launcher/xsettings-client.c
|
||||
src/launcher/xsettings-client.h
|
||||
src/launcher/xsettings-common.c
|
||||
src/launcher/xsettings-common.h
|
||||
src/systray/systraybar.c
|
||||
src/systray/systraybar.h
|
||||
src/taskbar/task.c
|
||||
src/taskbar/task.h
|
||||
src/taskbar/taskbar.c
|
||||
src/taskbar/taskbar.h
|
||||
src/taskbar/taskbarname.c
|
||||
src/taskbar/taskbarname.h
|
||||
src/tint2conf/CMakeLists.txt
|
||||
src/tint2conf/main.c
|
||||
src/tint2conf/main.h
|
||||
src/tint2conf/properties.c
|
||||
src/tint2conf/properties.h
|
||||
src/tint2conf/properties_rw.c
|
||||
src/tint2conf/properties_rw.h
|
||||
src/tint2conf/theme_view.c
|
||||
src/tint2conf/theme_view.h
|
||||
src/tint2conf/tint2conf.desktop
|
||||
src/tint2conf/tint2conf.svg
|
||||
src/tint2conf/tintwizard.py
|
||||
src/tooltip/tooltip.c
|
||||
src/tooltip/tooltip.h
|
||||
src/util/area.c
|
||||
src/util/area.h
|
||||
src/util/common.c
|
||||
src/util/common.h
|
||||
src/util/strnatcmp.c
|
||||
src/util/strnatcmp.h
|
||||
src/util/timer.c
|
||||
src/util/timer.h
|
||||
src/util/window.c
|
||||
src/util/window.h
|
||||
src/config.c
|
||||
src/config.h
|
||||
src/panel.c
|
||||
src/panel.h
|
||||
src/server.c
|
||||
src/server.h
|
||||
src/tint.c
|
||||
po/CMakeLists.txt
|
||||
po/LINGUAS
|
||||
po/POTFILES.in
|
||||
src/tint2conf/po/CMakeLists.txt
|
||||
src/tint2conf/po/CMakeLists.txt
|
||||
src/tint2conf/po/fr.po
|
||||
src/tint2conf/po/tint2conf.pot
|
||||
src/tint2conf/po/pl.po
|
||||
src/tint2conf/po/tint2conf.pot
|
||||
src/freespace/freespace.c
|
||||
src/freespace/freespace.h
|
||||
src/tint2conf/po/readme.txt
|
||||
@@ -1,22 +0,0 @@
|
||||
.
|
||||
./src
|
||||
./src/battery
|
||||
./src/clock
|
||||
./src/execplugin
|
||||
./src/launcher
|
||||
./src/sysmon
|
||||
./src/systray
|
||||
./src/taskbar
|
||||
./src/tint2conf
|
||||
./src/tooltip
|
||||
./src/util
|
||||
/usr/include
|
||||
/usr/include/gtk-2.0
|
||||
/usr/include/glib-2.0
|
||||
/usr/include/gdk-pixbuf-2.0
|
||||
/usr/include/cairo
|
||||
/usr/include/pango-1.0
|
||||
/usr/include/startup-notification-1.0
|
||||
po
|
||||
src/tint2conf/po
|
||||
src/freespace
|
||||
Reference in New Issue
Block a user