Commit graph

748 commits

Author SHA1 Message Date
Sebastian Reichel
441c420773 Remove static clock tooltip buffer
Use GLib's GDateTime to generate the tooltip, so that a
correctly sized string is automatically created.
2015-08-07 02:32:18 +02:00
Sebastian Reichel
edad9bb7f5 Fix memory leak for battery tooltips
Instead of returning a const string, that is fed into strdup, tooltip
functions are now supposed to return allocated strings. This fixes a
memory leak in the battery tooltip.

This is used instead of simply freeing the memory in the battery
tooltip function, since it also avoids a uselesss strdup().
2015-08-07 02:09:53 +02:00
o9000
aa47642161 Merge branch 'multi-battery-support' into 'master'
Multi battery support

Hi ,

I have a couple of patches for the battery widget
making it actually useful on my ThinkPad X250.

-- Sebastian

See merge request !6
2015-08-06 20:38:29 +00:00
Sebastian Reichel
57c38c462c Add support for battery tooltip option in tint2conf 2015-08-06 22:01:02 +02:00
Sebastian Reichel
995ae3c72b fix battery option parsing
Fix copy&paste mistake, battery should be enabled
for obsolete "battery" option instead of obsolete
"systray" option.
2015-08-06 22:01:02 +02:00
Sebastian Reichel
9df55d5ef7 Update copyright info in battery files 2015-08-06 22:01:02 +02:00
Sebastian Reichel
ffd659208a Add battery tooltip support
This adds a new config option 'battery_tooltip' (enabled
by default), which can be used to enable a tooltip for
the battery widget providing details for all installed
batteries.
2015-08-06 22:01:02 +02:00
o9000
a8e1c9d3aa tint2conf: Fix read of panel_monitor (issue #520) 2015-08-05 22:55:16 +02:00
Sebastian Reichel
291be57cde reset color after systray existing message
Currently all messages following the "another systray is running"
message are also printed in red. Fix this by reseting the color
at the end of the message.
2015-08-05 02:42:15 +02:00
Sebastian Reichel
ae375ae526 Split out Linux battery implementation and support multiple batteries
Some notebooks, like the ThinkPad X240 and X250 have two batteries
installed. So far only one of the batteries have been checked by
the tint2 widget making it more or less useless on those systems.

After this patch tint2 will aggregate the data from all batteries
instead.
2015-08-05 02:07:31 +02:00
o9000
84f9f6d0cd Systray: do not move empty icons to the side, as it breaks GTK2 StatusIcon blinking (issue #515) 2015-08-03 19:40:35 +02:00
o9000
ed24d0bd4c Fix command line argument processing (issue #516) 2015-08-03 18:34:12 +02:00
o9000
8eca71ac95 Remove parameter from tooltip_trigger_hide() (issue #516) 2015-08-03 18:20:16 +02:00
o9000
e345c0ddcd tint2conf: Add more mouse events for clock and battery (issue #505) 2015-08-01 09:31:11 +02:00
o9000
c874e76343 Merge branch 'moreclicks' into 'master'
Moreclicks

The two commits in this merge request would allow the user to set up as many as eight extra custom actions via tint2rc.

I've been running these changes (minus the up/down wheel actions) for many months without any obvious issues, mainly to adjust laptop screen brightness via a couple of scripts.

I've just tested the wheel actions and they appeared to work fine. The clock commit should solve issue #505.

I have merely augmented the work of two other people, and appropriate credits/references are indicated in the individual commit messages.

See merge request !5
2015-08-01 07:02:51 +00:00
o9000
687f5f2a1b Systray: use correct pointer type in xembed detection (note: dead code) 2015-08-01 08:45:20 +02:00
o9000
c7aa70f078 Systray: remove SubstructureNotifyMask from XSelectInput 2015-08-01 08:40:56 +02:00
o9000
690fe3f4d8 Systray: remove debugging messages 2015-08-01 08:39:51 +02:00
o9000
e5cd73f4a7 Add debugging function for showing monitor geometry 2015-08-01 08:25:36 +02:00
o9000
7ffc220891 Taskbar: Use consistent behavior when showing/hiding sticky (all desktop) windows 2015-08-01 08:22:08 +02:00
o9000
2799fe9346 Taskbar: better task monitor detection (issue #511) 2015-08-01 00:21:25 +02:00
o9000
e2023b7172 systray: Revert break embedding into 2 steps (breaks transparency for Qt icons) 2015-07-31 10:04:41 +02:00
o9000
9224971407 systray: Proper resize redirect handling 2015-07-31 09:58:17 +02:00
o9000
d492f80468 systray: Redirect resize events 2015-07-31 09:31:03 +02:00
o9000
78bc330448 systray: Break embedding into 2 steps 2015-07-30 23:54:46 +02:00
o9000
4e3989f9f5 Revert "taskbar: Add logging for window_get_monitor()"
This reverts commit 7162c5dea1.
2015-07-30 22:56:01 +02:00
o9000
9624b5d558 Revert "taskbar: Add logging for event_configure_notify()"
This reverts commit b99c5c204b.
2015-07-30 22:55:47 +02:00
o9000
754d9187df systray: Revert change that removed XSyncs 2015-07-27 09:47:00 +02:00
o9000
b99c5c204b taskbar: Add logging for event_configure_notify() 2015-07-26 12:08:59 +02:00
o9000
7162c5dea1 taskbar: Add logging for window_get_monitor() 2015-07-26 11:51:39 +02:00
o9000
e3939a56e1 systray: Set _NET_SYSTEM_TRAY_ICON_SIZE 2015-07-26 11:23:27 +02:00
o9000
ceafe9b281 config: Add missing #if 2015-07-23 23:29:02 +02:00
o9000
263d1ab15f systray: Remove unused variable 2015-07-23 22:08:56 +02:00
o9000
e76202b355 Fix systray rendering when compositor off 2015-07-23 20:38:33 +02:00
o9000
f68eabcf35 config: Prevent segfault if panel_items appears late in the config file 2015-07-23 19:56:34 +02:00
o9000
e218b3fa96 systray: Prevent segfault if systray disabled 2015-07-23 19:38:26 +02:00
o9000
50e21b4077 systray: Trying some variations 2015-07-19 18:06:45 +02:00
o9000
b6a1a1c0f6 systray: Remove unneeded resize 2015-07-19 17:12:41 +02:00
o9000
15e12142ca Minor improvements 2015-07-19 17:10:53 +02:00
o9000
b8c1c29df2 systray: Throttle resize events for misbehaving applications 2015-07-19 16:49:05 +02:00
o9000
4a1880ead0 Move things around in the systray code 2015-07-19 16:12:02 +02:00
o9000
57b878d5e4 Remove debug line 2015-07-16 22:33:13 +02:00
o9000
46aab61bf6 Revert "systray: Process XEmbed events according to spec"
This reverts commit 227dc8e48a.
2015-07-16 22:25:18 +02:00
o9000
227dc8e48a systray: Process XEmbed events according to spec 2015-07-16 21:08:48 +02:00
o9000
68c3205b53 systray: Handle UnmapNotify correctly 2015-07-16 21:08:48 +02:00
o9000
61f0a4ec85 systray: remove icon when reparented away from us 2015-07-16 21:08:47 +02:00
o9000
c606a1a35a systray: Separate reparenting from embedding 2015-07-16 21:08:47 +02:00
o9000
9933399dc4 systray: Withdraw window before reparenting 2015-07-16 21:08:47 +02:00
o9000
5ce8023ef7 systray: Watch for window events before reparenting 2015-07-16 21:08:47 +02:00
o9000
6438c75faf systray: A bit of cleanup 2015-07-16 21:08:47 +02:00
o9000
712097ba45 systray: Make sure we redraw the panel when rendering icons 2015-07-16 14:01:57 +02:00
o9000
9a5cb749ed systray: Workaround for GTK icon resize loop issue 2015-07-16 13:12:42 +02:00
o9000
d730f23027 systray: Trigger icon resize only when necessary 2015-07-16 09:02:13 +02:00
o9000
9f161f2baf More logging 2015-07-16 08:53:25 +02:00
o9000
2570ae2cf6 systray: Resize icons only if necessary 2015-07-15 09:53:09 +02:00
o9000
8d5c2d8cbb tint: remove inner loop from the main event loop 2015-07-14 08:33:13 +02:00
berkley4
fd78e6d886 Allow clicking and mousewheeling on the battery panel
This commit is the same as vimishor's original [*] except that I have
added middle-click and up/down mousewheel actions. In order to fix a
ftbs I also added guards to panel.c, panel.h & tint.c

The following configuration settings have been created :-

battery_lclick_command
battery_mclick_command
battery_rclick_command
battery_uwheel_command
battery_dwheel_command

[*] c78732c46a
2015-07-13 04:57:16 +01:00
berkley4
e84d963ab6 Allow middle click & up/down mousewheel on the clock
The bulk of this commit originally came from David B. Cortarello's
patch (see here - https://gitlab.com/o9000/tint2/issues/430), with me
adding the up/down mousewheel elements.

Under Openbox the middle-click is normally used to display the Openbox
menu and the mousewheel to switch desktop. So I needed to modify tint.c
in order to prevent openbox intercepting the new actions.

This commit creates the following new configuration settings :-

clock_mclick_command
clock_uwheel_command
clock_dwheel_command
2015-07-13 04:10:45 +01:00
o9000
c4fbc2962e tint2conf: Fix bad read of panel_margin 2015-07-12 22:23:25 +02:00
o9000
50a07df5d2 Silence g_thread_init warning 2015-07-12 17:54:40 +02:00
o9000
f61f2af2f4 Updated string files for translations 2015-07-12 17:24:43 +02:00
o9000
90805cb526 tint2conf: Better theme management 2015-07-12 17:01:44 +02:00
o9000
04fe80b498 copy_file(): prevent truncating file if src == dest 2015-07-12 17:01:20 +02:00
o9000
efe9aadb39 Prevent race at startup in detecting screen resolution changes 2015-07-12 14:36:11 +02:00
Sebastiaan Lokhorst
043a0f7ab3 Update old Google Code URLs to new GitLab location. 2015-07-05 11:14:00 +02:00
o9000
574b6bc214 tint2conf: Fix typo to load desktop files from subdirectories 2015-07-04 18:41:04 +02:00
o9000
89e4a5a460 Fix crash in tint2conf (wrong string length in allocation) 2015-07-04 18:31:01 +02:00
o9000
2ebc75944e tint2conf: Sort launchers by name 2015-07-04 17:33:19 +02:00
o9000
9fd9d51010 Fix timer bug (again) 2015-07-04 16:47:29 +02:00
o9000
8242c969e3 Detect compositor at startup 2015-07-04 13:34:42 +02:00
o9000
7cd5c16fca Fix crash when calling stop_timeout from the callback of a repeated timer 2015-07-04 13:34:09 +02:00
o9000
290ddc1fea tint2conf: fix launcher_apps_dir 2015-07-04 08:39:46 +02:00
o9000
47a7013029 Remove noisy debug messages 2015-06-28 11:34:53 +02:00
o9000
a4de005a54 Add missing include 2015-06-26 23:46:43 +02:00
o9000
5abbf168a9 Cosmetic changes 2015-06-25 15:56:36 +02:00
o9000
4d69a0bc33 tint2: Do not rely only on select() to detect new X events, since we sync the socket in the system tray which messes up select 2015-06-25 15:36:47 +02:00
o9000
222eca4099 systray: (disable_transparency=1) detect empty icons whenever a new icon is added, from any process; clear icon area because some icons were failing to redraw 2015-06-21 15:23:55 +02:00
o9000
ea75558ac2 systray: reduce icon flicker by painting on buffer instead of directly on window 2015-06-21 15:00:01 +02:00
o9000
876cae8239 systray: fix black icon background for 32-bit icons when disable_transparency = 1; fix empty icon detection when disable_transparency = 1; fix icon blinking by delaying rendering less aggressively; removed XClearArea on traywin->win (triggers unnecessary redraws); cache icon names; profiling messages updated 2015-06-21 14:50:08 +02:00
o9000
7c3951e3a0 systray: Profiling code. Export environment variable SYSTRAY_PROFILING=1 when running tint2 to enable it 2015-06-19 10:46:29 +02:00
o9000
552f060612 Updated strings in pl.po 2015-06-15 19:27:05 +02:00
dglava
4326cd1380 tint2conf: added bs, hr and sr translations 2015-06-14 23:10:30 +02:00
o9000
19b40bc59e systray: Check icon position 2015-06-14 12:23:34 +02:00
o9000
8c9a9a111e systray: trigger resizes in some places 2015-06-14 11:39:51 +02:00
o9000
b13540123b systray: force a repaint on icon resize 2015-06-14 11:21:42 +02:00
o9000
f5b2de62b6 systray: reorder operations to prevent the long icon first show delay that occurs sometimes 2015-06-14 10:51:30 +02:00
o9000
1ba023fc83 Removed tintwizard.py as it no longer supports all config options 2015-06-14 10:06:33 +02:00
o9000
36e9e92df1 Changed tintwizard #! to python 2 (note that tintwizard is obsolete) 2015-06-13 10:54:28 +00:00
o9000
cae621918e systray: Do not turn off compositing for missing window errors 2015-06-13 11:32:22 +02:00
o9000
f28983e5a7 systray: Use different X connection for XGetImage (fixes crash on ATI cards) 2015-06-12 21:28:58 +02:00
o9000
b35cdb70df systray: Detect window resizez during composited rendering to prevent crashes 2015-06-12 21:13:20 +02:00
o9000
80361a121e Better error handling in systray rendering and fall back to non-composited rendering in case of errors 2015-06-12 12:24:19 +02:00
o9000
b4ff007e42 systray: reorder some operations to make sure we resize correctly 2015-06-12 11:57:05 +02:00
o9000
ae379d865c systray: fix bad embed 2015-06-12 11:40:22 +02:00
o9000
0a3876dc8c systray: prevent race in error detection 2015-06-12 11:39:36 +02:00
o9000
e2d95acfa1 Add missing files for freespace 2015-06-12 10:41:51 +02:00
o9000
5ac1a6a653 systray: resize icon when reparenting 2015-06-12 09:44:13 +02:00
o9000
481c409617 Fix bad interaction between freespace and systray 2015-06-12 02:09:43 +02:00
o9000
e8869b4d87 systray: Minor change in error logging 2015-06-12 01:43:39 +02:00
o9000
b1b95e086d Free space item 2015-06-12 01:42:00 +02:00
o9000
df1f2d4e4b Merge taskbar_alignment from branch 2015-06-12 00:52:10 +02:00
o9000
860c100a04 launcher: sort desktop files by name in launcher_apps_dir 2015-06-07 13:03:49 +02:00
o9000
9040764cf1 systray: Cleaned up the code a bit 2015-06-07 12:58:29 +02:00
o9000
d8d4bc76cd systray: Delay reparenting to the first render to prevent graphical corruptions 2015-06-07 12:45:48 +02:00
o9000
fbcfa54061 Disable systray composited rendering if disable_transparency = 1 2015-06-07 11:44:43 +02:00
o9000
b235f77f39 systray: Prevent triggering concurrent updates for the same icon 2015-05-30 14:22:40 +02:00
o9000
1b4b0a8d8d systray: Delay icon rendering only when throttling is necessary 2015-05-30 13:41:29 +02:00
o9000
7ea0dc241c systray: Sort icons in the correct order when an icon is empty and order is right2left 2015-05-30 13:33:44 +02:00
o9000
39e67df44d Revert "systray: Sort icons in the correct order when an icon is empty and order is right2left"
This reverts commit cb17e5a662.
2015-05-30 13:23:20 +02:00
o9000
cb17e5a662 systray: Sort icons in the correct order when an icon is empty and order is right2left 2015-05-30 13:03:42 +02:00
Daniel Napora
7e2e1d5adf Polish translations for desktop files 2015-05-28 21:48:06 +02:00
Daniel Napora
d839d80c2e Polish translation 2015-05-28 21:02:31 +02:00
o9000
06dfcf70be Updated localization file with new strings 2015-05-21 12:44:41 +02:00
o9000
44785a49da Updated tint2conf for localization 2015-05-21 12:34:52 +02:00
o9000
e20448d6b5 Annotate strings for translation 2015-05-21 10:57:50 +02:00
o9000
6014b51850 Better error handling in systray icon rendering 2015-05-20 15:42:27 +02:00
o9000
5acda6a0c0 Silence warning 2015-05-15 08:39:12 +02:00
o9000
66c98bc820 Fix bad include 2015-05-14 19:19:42 +00:00
o9000
a4894b8257 Workaround for empty systray icon in Google Chrome (misbehaving) - fix resize 2015-05-13 22:58:58 +02:00
o9000
b7dbb919a9 Merge branch 'title-race' 2015-05-13 22:41:52 +02:00
o9000
a08491c122 Workaround for empty systray icon in Google Chrome (misbehaving) - fix sorting 2015-05-13 21:17:02 +02:00
o9000
8795f50bb8 Workaround for empty systray icon in Google Chrome (misbehaving) - fix sorting 2015-05-13 21:02:40 +02:00
o9000
3ab42f9b72 Workaround for empty systray icon in Google Chrome (misbehaving) 2015-05-11 21:19:36 +02:00
o9000
7bce19452e Reduce memory footprint 2015-05-10 12:43:58 +02:00
o9000
1ff028e99f Fix some battery issues when unplugging/replugging 2015-05-08 23:35:44 +02:00
o9000
5450dcca0b Attempt to fix new window title race in fvwm 2015-05-08 21:49:26 +02:00
o9000
d2ee0a481f Adding missing icons 2015-05-05 11:18:55 +02:00
o9000
1d95e01882 tint2conf: Updated tooltips 2015-05-03 22:30:10 +02:00
o9000
ebc356d1c7 Updated tint2rc file header with link to docs 2015-05-03 20:01:58 +00:00
o9000
60f01f7fff Updated icons and desktop files 2015-05-03 19:17:24 +02:00
o9000
1d02b8588b Fix icon loading with wrong image extension 2015-05-03 16:22:23 +02:00
o9000
e7c3f99e28 Attempt to fix icon rendering problems 2015-05-03 15:36:42 +02:00
o9000
a9330b424b launcher: New option launcher_icon_theme_override to preserve legacy behavior 2015-05-03 10:05:36 +02:00
o9000
b9508450b7 panel: Use WINDOW_TYPE_SPLASH instead of DOCK if panel_layer=normal and panel_dock=0 otherwise it is impossible to get normal stacking 2015-05-03 09:27:52 +02:00
o9000
7384fd8270 Battery: fixes for FreeBSD 2015-05-03 08:52:39 +02:00
o9000
7ea2452ae4 tint2conf: fixes for *BSD 2015-05-02 22:24:15 +02:00
o9000
193b3b5a81 Fix build on Debian Jessie 2015-04-27 19:16:21 +02:00
o9000
bd9e12b993 Wrap text at word boundaries 2015-04-26 16:33:07 +02:00
o9000
78595a3d1f Renamed notification area -> system tray for consistency 2015-04-26 15:37:25 +02:00
o9000
95fa0bbf83 tint2 & tint2conf: Use spacing in task_padding 2015-04-26 15:16:24 +02:00
o9000
e6612d2893 tint2conf: Multiple fixes 2015-04-26 14:42:20 +02:00
o9000
298f60f1b0 tint2conf: Fix taskbar_sort_order, taskbar_name_padding 2015-04-26 13:49:41 +02:00
o9000
7794272f8e tint2conf: Fix background index mess 2015-04-26 13:25:28 +02:00
o9000
89e2057a8e tint2conf: Checksum files to identify and back up manually edited configs 2015-04-25 21:38:55 +02:00
o9000
2ecb1c4ef4 config: Do not treat invalid task status values as defaults 2015-04-25 16:37:23 +02:00
o9000
dff7355f3b tint2conf: load old config files better 2015-04-25 16:14:32 +02:00
o9000
233157930b tint2conf: cleanup GUI 2015-04-25 15:45:15 +02:00
o9000
ae76f82ee0 tint2conf: Tooltips 2015-04-25 13:03:55 +02:00
o9000
60b56599cb tint2conf: GUI changes
git-svn-id: http://tint2.googlecode.com/svn/trunk@767 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
2015-04-18 13:30:30 +00:00
o9000
b4f15db397 Use font shadows for all elements except tooltips
git-svn-id: http://tint2.googlecode.com/svn/trunk@766 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
2015-04-18 13:22:07 +00:00