Compare commits

..

25 Commits

Author SHA1 Message Date
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
54708a6167 Updated desktop file 2015-05-03 17:21:43 +00:00
o9000
60f01f7fff Updated icons and desktop files 2015-05-03 19:17:24 +02:00
o9000
9f8860f003 Updated tint2.desktop 2015-05-03 16:34:12 +00:00
o9000
be19d1eeef Add tint2.desktop 2015-05-03 16:31:07 +00:00
o9000
1d02b8588b Fix icon loading with wrong image extension 2015-05-03 16:22:23 +02:00
o9000
487774eac9 Updated readme 2015-05-03 15:47:24 +02:00
o9000
d710eb9cea Updated readme 2015-05-03 13:46:01 +00:00
o9000
0385ca46dc Updated changelog 2015-05-03 13:44:03 +00:00
o9000
e7c3f99e28 Attempt to fix icon rendering problems 2015-05-03 15:36:42 +02:00
o9000
14d5c4e43d Updated changelog 2015-05-03 08:07:37 +00:00
o9000
a9330b424b launcher: New option launcher_icon_theme_override to preserve legacy behavior 2015-05-03 10:05:36 +02:00
o9000
5486c93f4c Updated changelog 2015-05-03 07:47:45 +00: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
c3b60f1b4d Fixed README in CMakeLists.txt 2015-05-02 11:07:26 +00:00
o9000
193b3b5a81 Fix build on Debian Jessie 2015-04-27 19:16:21 +02:00
o9000
9bd4257fcf Updated readme 2015-04-27 16:45:12 +00:00
o9000
5bf8efac03 Update readme 2015-04-27 16:43:27 +00: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
21 changed files with 741 additions and 214 deletions

View File

@@ -145,9 +145,12 @@ set_target_properties( tint2 PROPERTIES COMPILE_FLAGS "-Wall -fno-strict-aliasin
set_target_properties( tint2 PROPERTIES LINK_FLAGS "-pthread -fno-strict-aliasing ${ASAN_L_FLAGS}" ) set_target_properties( tint2 PROPERTIES LINK_FLAGS "-pthread -fno-strict-aliasing ${ASAN_L_FLAGS}" )
install( TARGETS tint2 DESTINATION bin ) install( TARGETS tint2 DESTINATION bin )
install( FILES tint2.svg DESTINATION ${DATADIR}/icons/hicolor/scalable/apps )
install( FILES tint2.desktop DESTINATION ${DATADIR}/applications )
install( CODE "execute_process(COMMAND gtk-update-icon-cache -f -t ${DATADIR}/icons/hicolor WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX})" )
install( FILES sample/tint2rc DESTINATION ${SYSCONFDIR}/xdg/tint2 ) install( FILES sample/tint2rc DESTINATION ${SYSCONFDIR}/xdg/tint2 )
install( FILES default_icon.png DESTINATION ${DATADIR}/tint2 ) install( FILES default_icon.png DESTINATION ${DATADIR}/tint2 )
install( FILES AUTHORS ChangeLog README DESTINATION ${DOCDIR} ) install( FILES AUTHORS ChangeLog README.md DESTINATION ${DOCDIR} )
install( FILES doc/tint2.1 DESTINATION ${MANDIR}/man1 ) install( FILES doc/tint2.1 DESTINATION ${MANDIR}/man1 )
if( ENABLE_EXAMPLES ) if( ENABLE_EXAMPLES )
file( GLOB SAMPLEFILES sample/*.tint2rc ) file( GLOB SAMPLEFILES sample/*.tint2rc )

View File

@@ -1,7 +1,4 @@
2015-04-26 tint2-0.12-rc2 2015-05-03 master
- Bumped RC version due to multiple bugfixes (mostly in tint2conf)
2015-04-25 tint2-0.12-rc1
- Note: the changes listed here are based on the previous release tint2 0.11, however some distributions (e.g. Debian) - 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 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)'. already present. They are marked with '(already released by distros)'.
@@ -12,8 +9,8 @@
- Enhancement: more thorough search for icons - Enhancement: more thorough search for icons
- Configuration GUI: tint2conf - Configuration GUI: tint2conf
- Experimental, testing/feedback needed - Experimental, testing/feedback needed
- System tray: - Icons (system tray, task buttons, launcher):
- Changed rendering method to fix icon corruptions (need user feedback; see known issues) - Changed rendering method to fix icon corruptions (please report any problems)
- Many bugfixes - Many bugfixes
- New config options (see https://gitlab.com/o9000/tint2/wikis/Configure): - New config options (see https://gitlab.com/o9000/tint2/wikis/Configure):
- Panel: - Panel:
@@ -30,6 +27,7 @@
- launcher* (already released by distros) - launcher* (already released by distros)
- launcher_apps_dir (previously patched in by some distros) - launcher_apps_dir (previously patched in by some distros)
- startup_notifications - startup_notifications
- launcher_icon_theme_override
- System tray: - System tray:
- systray_monitor - systray_monitor
- Config options with changed behavior: - Config options with changed behavior:
@@ -39,21 +37,15 @@
set it to zero (or change the border color/style to match tint2). If you set it to zero, make sure you do not have set it to zero (or change the border color/style to match tint2). If you set it to zero, make sure you do not have
reserved space at the edge of the screen in the OpenBox config. reserved space at the edge of the screen in the OpenBox config.
Reason for change: issues 257, 394, 461, 465, 481. Reason for change: issues 257, 394, 461, 465, 481.
- panel_layer: previously, 'panel_layer = normal' was not functioning correctly. Now it does (it requires panel_dock = 0).
Note that in this case some compositors will draw shadows of other windows behind tint2. This can be avoided in compton
using the option shadow-exclude-reg = "x35+0-0" where 35 should be replaced with the size of the panel.
- font_shadow: shadows are thicker and softer, and are now applied to all text elements, not just the taskbar. - font_shadow: shadows are thicker and softer, and are now applied to all text elements, not just the taskbar.
Reason for change: legibility improved for transparent panels. Reason for change: legibility improved for transparent panels.
- Launcher: - Launcher:
- launcher_icon_theme: previously, this parameter had a lower priority than the icon theme provided through the
XSettings manager; as virtually all DEs provide one, it was useless. Now the parameter has a higher priority.
Remove it to respect the XSettings manager settings.
Reasons for change:
* ability to use a custom icon theme only in tint2
* several DEs do not allow selecting the hicolor theme
- launcher_item_app: now it expands leading ~ to the path to the user's home directory. - launcher_item_app: now it expands leading ~ to the path to the user's home directory.
- Project hosting: - Project hosting:
- Migrated from https://code.google.com/p/tint2 to https://gitlab.com/o9000/tint2 and switched from svn to git - Migrated from https://code.google.com/p/tint2 to https://gitlab.com/o9000/tint2 and switched from svn to git
- Known issues
- System tray:
- The opacity (alpha) in systray_icon_asb must be set to 100 otherwise icon corruptions might occur
2010-06-26 2010-06-26
- unhide tint2 panel when dragging something - unhide tint2 panel when dragging something

View File

@@ -1,14 +1,14 @@
### New unstable release: 0.12-rc2 ### New unstable release: 0.12-rc3
Changes: https://gitlab.com/o9000/tint2/blob/master/ChangeLog Changes: https://gitlab.com/o9000/tint2/blob/master/ChangeLog
Documentation: https://gitlab.com/o9000/tint2/wikis/home Documentation: https://gitlab.com/o9000/tint2/wikis/home
Try it out with: Try it out with (see also [dependencies](https://gitlab.com/o9000/tint2/wikis/Install#dependencies)):
``` ```
mkdir tint2-0.12-rc2 mkdir tint2-0.12-rc3
cd tint2-0.12-rc2 cd tint2-0.12-rc3
wget 'https://gitlab.com/o9000/tint2/repository/archive.tar.gz?ref=v0.12-rc2' --output-document tint2-0.12-rc2.tar.gz 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-rc2.tar.gz tar -xzf tint2-0.12-rc3.tar.gz
cd tint2.git cd tint2.git
mkdir build mkdir build
cd build cd build

View File

@@ -188,7 +188,11 @@ void init_battery()
battery_found = 1; battery_found = 1;
} }
#elif defined(__FreeBSD__) #elif defined(__FreeBSD__)
// Nothing to do int sysctl_out = 0;
size_t len = sizeof(sysctl_out);
battery_found = (sysctlbyname("hw.acpi.battery.state", &sysctl_out, &len, NULL, 0) == 0) ||
(sysctlbyname("hw.acpi.battery.time", &sysctl_out, &len, NULL, 0) == 0) ||
(sysctlbyname("hw.acpi.battery.life", &sysctl_out, &len, NULL, 0) == 0);
#else // Linux #else // Linux
GDir *directory = 0; GDir *directory = 0;
GError *error = NULL; GError *error = NULL;

View File

@@ -664,6 +664,9 @@ void add_entry (char *key, char *value)
free(icon_theme_name_config); free(icon_theme_name_config);
icon_theme_name_config = strdup(value); icon_theme_name_config = strdup(value);
} }
else if (strcmp(key, "launcher_icon_theme_override") == 0) {
launcher_icon_theme_override = atoi(value);
}
else if (strcmp(key, "launcher_icon_asb") == 0) { else if (strcmp(key, "launcher_icon_asb") == 0) {
extract_values(value, &value1, &value2, &value3); extract_values(value, &value1, &value2, &value3);
launcher_alpha = atoi(value1); launcher_alpha = atoi(value1);

View File

@@ -34,7 +34,6 @@
#ifdef HAVE_RSVG #ifdef HAVE_RSVG
#include <librsvg/rsvg.h> #include <librsvg/rsvg.h>
#include <librsvg/rsvg-cairo.h>
#endif #endif
#include "window.h" #include "window.h"
@@ -54,6 +53,7 @@ int launcher_saturation;
int launcher_brightness; int launcher_brightness;
char *icon_theme_name_config; char *icon_theme_name_config;
char *icon_theme_name_xsettings; char *icon_theme_name_xsettings;
int launcher_icon_theme_override;
XSettingsClient *xsettings_client; XSettingsClient *xsettings_client;
int startup_notifications; int startup_notifications;
@@ -70,6 +70,7 @@ void default_launcher()
launcher_brightness = 0; launcher_brightness = 0;
icon_theme_name_config = NULL; icon_theme_name_config = NULL;
icon_theme_name_xsettings = NULL; icon_theme_name_xsettings = NULL;
launcher_icon_theme_override = 0;
xsettings_client = NULL; xsettings_client = NULL;
startup_notifications = 0; startup_notifications = 0;
} }
@@ -212,8 +213,9 @@ int resize_launcher(void *obj)
free_icon(launcherIcon->icon_scaled); free_icon(launcherIcon->icon_scaled);
launcherIcon->icon_original = launcherIcon->icon_scaled = NULL; launcherIcon->icon_original = launcherIcon->icon_scaled = NULL;
// Load the new file and scale // Load the new file and scale
launcherIcon->icon_original = imlib_load_image_immediately(new_icon_path);
#ifdef HAVE_RSVG #ifdef HAVE_RSVG
if (g_str_has_suffix(new_icon_path, ".svg")) { if (!launcherIcon->icon_original && g_str_has_suffix(new_icon_path, ".svg")) {
GError* err = NULL; GError* err = NULL;
RsvgHandle* svg = rsvg_handle_new_from_file(new_icon_path, &err); RsvgHandle* svg = rsvg_handle_new_from_file(new_icon_path, &err);
@@ -356,10 +358,14 @@ void draw_launcher_icon(void *obj, cairo_t *c)
Imlib_Image icon_scaled = launcherIcon->icon_scaled; Imlib_Image icon_scaled = launcherIcon->icon_scaled;
// Render // Render
imlib_context_set_image(icon_scaled); imlib_context_set_image(icon_scaled);
if (server.real_transparency) {
render_image(launcherIcon->area.pix, 0, 0);
} else {
imlib_context_set_blend(1); imlib_context_set_blend(1);
imlib_context_set_drawable(launcherIcon->area.pix); imlib_context_set_drawable(launcherIcon->area.pix);
imlib_render_image_on_drawable(0, 0); imlib_render_image_on_drawable(0, 0);
} }
}
Imlib_Image scale_icon(Imlib_Image original, int icon_size) Imlib_Image scale_icon(Imlib_Image original, int icon_size)
{ {
@@ -367,11 +373,14 @@ Imlib_Image scale_icon(Imlib_Image original, int icon_size)
if (original) { if (original) {
imlib_context_set_image (original); imlib_context_set_image (original);
icon_scaled = imlib_create_cropped_scaled_image(0, 0, imlib_image_get_width(), imlib_image_get_height(), icon_size, icon_size); icon_scaled = imlib_create_cropped_scaled_image(0, 0, imlib_image_get_width(), imlib_image_get_height(), icon_size, icon_size);
imlib_context_set_image (icon_scaled); imlib_context_set_image (icon_scaled);
imlib_image_set_has_alpha(1); imlib_image_set_has_alpha(1);
DATA32* data = imlib_image_get_data(); DATA32* data = imlib_image_get_data();
adjust_asb(data, icon_size, icon_size, launcher_alpha, (float)launcher_saturation/100, (float)launcher_brightness/100); adjust_asb(data, icon_size, icon_size, launcher_alpha, (float)launcher_saturation/100, (float)launcher_brightness/100);
imlib_image_put_back_data(data); imlib_image_put_back_data(data);
imlib_context_set_image (icon_scaled);
} else { } else {
icon_scaled = imlib_create_image(icon_size, icon_size); icon_scaled = imlib_create_image(icon_size, icon_size);
imlib_context_set_image (icon_scaled); imlib_context_set_image (icon_scaled);
@@ -487,9 +496,15 @@ void launcher_load_icons(Launcher *launcher)
// Populates the list_themes list // Populates the list_themes list
void launcher_load_themes(Launcher *launcher) void launcher_load_themes(Launcher *launcher)
{ {
launcher->list_themes = load_themes(icon_theme_name_config launcher->list_themes = load_themes(launcher_icon_theme_override
? (icon_theme_name_config
? icon_theme_name_config ? icon_theme_name_config
: icon_theme_name_xsettings : icon_theme_name_xsettings
? icon_theme_name_xsettings ? icon_theme_name_xsettings
: "hicolor"); : "hicolor")
: (icon_theme_name_xsettings
? icon_theme_name_xsettings
: icon_theme_name_config
? icon_theme_name_config
: "hicolor"));
} }

View File

@@ -42,6 +42,7 @@ extern int launcher_saturation;
extern int launcher_brightness; extern int launcher_brightness;
extern char *icon_theme_name_xsettings; // theme name extern char *icon_theme_name_xsettings; // theme name
extern char *icon_theme_name_config; extern char *icon_theme_name_config;
extern int launcher_icon_theme_override;
extern XSettingsClient *xsettings_client; extern XSettingsClient *xsettings_client;
extern int startup_notifications; extern int startup_notifications;

View File

@@ -524,7 +524,9 @@ void set_panel_properties(Panel *p)
} }
// Dock // Dock
long val = panel_dock ? server.atom._NET_WM_WINDOW_TYPE_DOCK : server.atom._NET_WM_WINDOW_TYPE_SPLASH; long val = (!panel_dock && panel_layer == NORMAL_LAYER)
? server.atom._NET_WM_WINDOW_TYPE_SPLASH
: server.atom._NET_WM_WINDOW_TYPE_DOCK;
XChangeProperty (server.dsp, p->main_win, server.atom._NET_WM_WINDOW_TYPE, XA_ATOM, 32, PropModeReplace, (unsigned char *) &val, 1); XChangeProperty (server.dsp, p->main_win, server.atom._NET_WM_WINDOW_TYPE, XA_ATOM, 32, PropModeReplace, (unsigned char *) &val, 1);
val = ALLDESKTOP; val = ALLDESKTOP;

View File

@@ -601,7 +601,7 @@ void systray_render_icon_now(void* t)
adjust_asb(data, traywin->width, traywin->height, systray.alpha, (float)systray.saturation/100, (float)systray.brightness/100); adjust_asb(data, traywin->width, traywin->height, systray.alpha, (float)systray.saturation/100, (float)systray.brightness/100);
imlib_image_put_back_data(data); imlib_image_put_back_data(data);
XCopyArea(server.dsp, render_background, systray.area.pix, server.gc, traywin->x-systray.area.posx, traywin->y-systray.area.posy, traywin->width, traywin->height, traywin->x-systray.area.posx, traywin->y-systray.area.posy); XCopyArea(server.dsp, render_background, systray.area.pix, server.gc, traywin->x-systray.area.posx, traywin->y-systray.area.posy, traywin->width, traywin->height, traywin->x-systray.area.posx, traywin->y-systray.area.posy);
render_image(systray.area.pix, traywin->x-systray.area.posx, traywin->y-systray.area.posy, traywin->width, traywin->height); render_image(systray.area.pix, traywin->x-systray.area.posx, traywin->y-systray.area.posy);
XCopyArea(server.dsp, systray.area.pix, panel->main_win, server.gc, traywin->x-systray.area.posx, traywin->y-systray.area.posy, traywin->width, traywin->height, traywin->x, traywin->y); XCopyArea(server.dsp, systray.area.pix, panel->main_win, server.gc, traywin->x-systray.area.posx, traywin->y-systray.area.posy, traywin->width, traywin->height, traywin->x, traywin->y);
imlib_free_image_and_decache(); imlib_free_image_and_decache();
XFreePixmap(server.dsp, tmp_pmap); XFreePixmap(server.dsp, tmp_pmap);

View File

@@ -50,6 +50,9 @@ Task *add_task (Window win)
if (!win) return 0; if (!win) return 0;
if (window_is_hidden(win)) return 0; if (window_is_hidden(win)) return 0;
XSelectInput(server.dsp, win, PropertyChangeMask|StructureNotifyMask);
XFlush(server.dsp);
int monitor; int monitor;
if (nb_panel > 1) { if (nb_panel > 1) {
monitor = window_get_monitor (win); monitor = window_get_monitor (win);
@@ -75,8 +78,7 @@ Task *add_task (Window win)
get_title(&new_tsk); get_title(&new_tsk);
get_icon(&new_tsk); get_icon(&new_tsk);
//printf("task %s : desktop %d, monitor %d\n", new_tsk->title, desktop, monitor); //printf("new task %s win %u: desktop %d, monitor %d\n", new_tsk.title, win, new_tsk.desktop, monitor);
XSelectInput (server.dsp, new_tsk.win, PropertyChangeMask|StructureNotifyMask);
GPtrArray* task_group = g_ptr_array_new(); GPtrArray* task_group = g_ptr_array_new();
Taskbar *tskbar; Taskbar *tskbar;
@@ -348,10 +350,14 @@ void draw_task_icon (Task *tsk, int text_width)
// Render // Render
imlib_context_set_image (tsk->icon[tsk->current_state]); imlib_context_set_image (tsk->icon[tsk->current_state]);
if (server.real_transparency) {
render_image(tsk->area.pix, pos_x, panel->g_task.icon_posy);
} else {
imlib_context_set_blend(1); imlib_context_set_blend(1);
imlib_context_set_drawable(tsk->area.pix); imlib_context_set_drawable(tsk->area.pix);
imlib_render_image_on_drawable(pos_x, panel->g_task.icon_posy); imlib_render_image_on_drawable(pos_x, panel->g_task.icon_posy);
} }
}
void draw_task (void *obj, cairo_t *c) void draw_task (void *obj, cairo_t *c)
@@ -374,7 +380,7 @@ void draw_task (void *obj, cairo_t *c)
// pango use U+22EF or U+2026 // pango use U+22EF or U+2026
pango_layout_set_width(layout, ((Taskbar*)tsk->area.parent)->text_width * PANGO_SCALE); pango_layout_set_width(layout, ((Taskbar*)tsk->area.parent)->text_width * PANGO_SCALE);
pango_layout_set_height(layout, panel->g_task.text_height * PANGO_SCALE); pango_layout_set_height(layout, panel->g_task.text_height * PANGO_SCALE);
pango_layout_set_wrap(layout, PANGO_WRAP_CHAR); pango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR);
pango_layout_set_ellipsize (layout, PANGO_ELLIPSIZE_END); pango_layout_set_ellipsize (layout, PANGO_ELLIPSIZE_END);
/* Center text */ /* Center text */

View File

@@ -727,6 +727,7 @@ void event_property_notify (XEvent *e)
} }
else { else {
tsk = task_get_task (win); tsk = task_get_task (win);
//printf("change win = %u, task = %p\n", win, tsk);
if (!tsk) { if (!tsk) {
if (at != server.atom._NET_WM_STATE) if (at != server.atom._NET_WM_STATE)
return; return;

View File

@@ -64,7 +64,6 @@ set_target_properties( tint2conf PROPERTIES COMPILE_FLAGS "-Wall -pthread" )
set_target_properties( tint2conf PROPERTIES LINK_FLAGS "-pthread" ) set_target_properties( tint2conf PROPERTIES LINK_FLAGS "-pthread" )
install( TARGETS tint2conf DESTINATION bin ) install( TARGETS tint2conf DESTINATION bin )
install( PROGRAMS tintwizard.py DESTINATION bin ) install( FILES tint2conf.svg DESTINATION ${DATADIR}/icons/hicolor/scalable/apps )
install( FILES taskbar.svg DESTINATION ${DATADIR}/icons/hicolor/scalable/apps )
install( FILES tint2conf.desktop DESTINATION ${DATADIR}/applications ) install( FILES tint2conf.desktop DESTINATION ${DATADIR}/applications )
install( CODE "execute_process(COMMAND gtk-update-icon-cache -f -t ${DATADIR}/icons/hicolor WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX})" ) install( CODE "execute_process(COMMAND gtk-update-icon-cache -f -t ${DATADIR}/icons/hicolor WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX})" )

View File

@@ -115,6 +115,7 @@ GtkWidget *launcher_background;
GtkWidget *startup_notifications; GtkWidget *startup_notifications;
IconThemeWrapper *icon_theme; IconThemeWrapper *icon_theme;
GtkWidget *launcher_tooltip; GtkWidget *launcher_tooltip;
GtkWidget *launcher_icon_theme_override;
GtkListStore *backgrounds; GtkListStore *backgrounds;
GtkWidget *current_background, GtkWidget *current_background,
@@ -174,7 +175,7 @@ void applyClicked(GtkWidget *widget, gpointer data)
config_save_file(file); config_save_file(file);
} }
int unused = system("killall -SIGUSR1 tint2"); int unused = system("killall -SIGUSR1 tint2 || pkill -SIGUSR1 -x tint2");
(void)unused; (void)unused;
g_free(file); g_free(file);
g_timeout_add(SNAPSHOT_TICK, (GSourceFunc)update_snapshot, NULL); g_timeout_add(SNAPSHOT_TICK, (GSourceFunc)update_snapshot, NULL);
@@ -295,7 +296,7 @@ GtkWidget *create_properties()
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), addScrollBarToWidget(page_clock), label); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), addScrollBarToWidget(page_clock), label);
create_clock(page_clock); create_clock(page_clock);
label = gtk_label_new(_("Notification area")); label = gtk_label_new(_("System tray"));
gtk_widget_show(label); gtk_widget_show(label);
page_systemtray = gtk_vbox_new(FALSE, DEFAULT_HOR_SPACING); page_systemtray = gtk_vbox_new(FALSE, DEFAULT_HOR_SPACING);
gtk_container_set_border_width(GTK_CONTAINER(page_systemtray), 10); gtk_container_set_border_width(GTK_CONTAINER(page_systemtray), 10);
@@ -852,7 +853,7 @@ void create_panel(GtkWidget *parent)
row++; row++;
col = 2; col = 2;
label = gtk_label_new(_("Width")); label = gtk_label_new(_("Length"));
gtk_misc_set_alignment(GTK_MISC(label), 0, 0); gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
gtk_widget_show(label); gtk_widget_show(label);
gtk_table_attach(GTK_TABLE(table), label, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); gtk_table_attach(GTK_TABLE(table), label, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
@@ -862,7 +863,7 @@ void create_panel(GtkWidget *parent)
gtk_widget_show(panel_width); gtk_widget_show(panel_width);
gtk_table_attach(GTK_TABLE(table), panel_width, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); gtk_table_attach(GTK_TABLE(table), panel_width, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
col++; col++;
gtk_tooltips_set_tip(tooltips, panel_width, "The width of the panel", NULL); gtk_tooltips_set_tip(tooltips, panel_width, "The length of the panel (width for horizontal panels, height for vertical panels)", NULL);
panel_combo_width_type = gtk_combo_box_new_text(); panel_combo_width_type = gtk_combo_box_new_text();
gtk_widget_show(panel_combo_width_type); gtk_widget_show(panel_combo_width_type);
@@ -871,11 +872,11 @@ void create_panel(GtkWidget *parent)
gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_width_type), _("Percent")); gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_width_type), _("Percent"));
gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_width_type), _("Pixels")); gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_width_type), _("Pixels"));
gtk_combo_box_set_active(GTK_COMBO_BOX(panel_combo_width_type), 0); gtk_combo_box_set_active(GTK_COMBO_BOX(panel_combo_width_type), 0);
gtk_tooltips_set_tip(tooltips, panel_combo_width_type, "The units used to specify the width of the panel: pixels or percentage of the monitor size", NULL); gtk_tooltips_set_tip(tooltips, panel_combo_width_type, "The units used to specify the length of the panel: pixels or percentage of the monitor size", NULL);
row++; row++;
col = 2; col = 2;
label = gtk_label_new(_("Height")); label = gtk_label_new(_("Size"));
gtk_misc_set_alignment(GTK_MISC(label), 0, 0); gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
gtk_widget_show(label); gtk_widget_show(label);
gtk_table_attach(GTK_TABLE(table), label, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); gtk_table_attach(GTK_TABLE(table), label, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
@@ -885,7 +886,7 @@ void create_panel(GtkWidget *parent)
gtk_widget_show(panel_height); gtk_widget_show(panel_height);
gtk_table_attach(GTK_TABLE(table), panel_height, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); gtk_table_attach(GTK_TABLE(table), panel_height, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
col++; col++;
gtk_tooltips_set_tip(tooltips, panel_height, "The height of the panel", NULL); gtk_tooltips_set_tip(tooltips, panel_height, "The size of the panel (height for horizontal panels, width for vertical panels)", NULL);
panel_combo_height_type = gtk_combo_box_new_text(); panel_combo_height_type = gtk_combo_box_new_text();
gtk_widget_show(panel_combo_height_type); gtk_widget_show(panel_combo_height_type);
@@ -894,7 +895,7 @@ void create_panel(GtkWidget *parent)
gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_height_type), _("Percent")); gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_height_type), _("Percent"));
gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_height_type), _("Pixels")); gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_height_type), _("Pixels"));
gtk_combo_box_set_active(GTK_COMBO_BOX(panel_combo_height_type), 0); gtk_combo_box_set_active(GTK_COMBO_BOX(panel_combo_height_type), 0);
gtk_tooltips_set_tip(tooltips, panel_combo_height_type, "The units used to specify the height of the panel: pixels or percentage of the monitor size", NULL); gtk_tooltips_set_tip(tooltips, panel_combo_height_type, "The units used to specify the size of the panel: pixels or percentage of the monitor size", NULL);
row++; row++;
col = 2; col = 2;
@@ -1202,7 +1203,10 @@ void create_panel(GtkWidget *parent)
"Match the panel size means that maximized windows should extend to the edge of the panel. \n" "Match the panel size means that maximized windows should extend to the edge of the panel. \n"
"Match the hidden panel size means that maximized windows should extend to the edge of the panel when hidden; " "Match the hidden panel size means that maximized windows should extend to the edge of the panel when hidden; "
"when visible, the panel and the windows will overlap. \n" "when visible, the panel and the windows will overlap. \n"
"Fill the screen means that maximized windows will always have the same size as the screen.", NULL); "Fill the screen means that maximized windows will always have the same size as the screen. \n"
"\n"
"Note: on multi-monitor (Xinerama) setups, the panel must be placed at the edge (not in the middle) "
"of the virtual screen for this to work correctly.", NULL);
row++; row++;
col = 2; col = 2;
@@ -1882,7 +1886,7 @@ void create_launcher(GtkWidget *parent)
icon_theme = NULL; icon_theme = NULL;
launcher_apps = gtk_list_store_new(appsNumCols, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); launcher_apps = gtk_list_store_new(appsNumCols, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
all_apps = gtk_list_store_new(appsNumCols, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING); all_apps = gtk_list_store_new(appsNumCols, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
icon_themes = gtk_list_store_new(iconsNumCols, G_TYPE_STRING, G_TYPE_STRING); icon_themes = gtk_list_store_new(iconsNumCols, G_TYPE_STRING, G_TYPE_STRING);
launcher_apps_view = gtk_tree_view_new(); launcher_apps_view = gtk_tree_view_new();
@@ -2153,6 +2157,12 @@ void create_launcher(GtkWidget *parent)
"tint2 will detect and use the icon theme of your desktop as long as you have " "tint2 will detect and use the icon theme of your desktop as long as you have "
"an XSETTINGS manager running (most desktop environments do).", NULL); "an XSETTINGS manager running (most desktop environments do).", NULL);
launcher_icon_theme_override = gtk_check_button_new_with_label("Overrides XSETTINGS");
gtk_widget_show(launcher_icon_theme_override);
gtk_table_attach(GTK_TABLE(table), launcher_icon_theme_override, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
col++;
gtk_tooltips_set_tip(tooltips, launcher_icon_theme_override, "If enabled, the icon theme selected here will override the one provided by XSETTINGS.", NULL);
row++, col = 2; row++, col = 2;
label = gtk_label_new(_("Startup notifications")); label = gtk_label_new(_("Startup notifications"));
gtk_misc_set_alignment(GTK_MISC(label), 0, 0); gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
@@ -2198,6 +2208,7 @@ void create_launcher(GtkWidget *parent)
fprintf(stderr, "Loading .desktop files\n"); fprintf(stderr, "Loading .desktop files\n");
load_desktop_files("/usr/share/applications"); load_desktop_files("/usr/share/applications");
load_desktop_files("/usr/local/share/applications");
gchar *path = g_build_filename(g_get_home_dir(), ".local/share/applications", NULL); gchar *path = g_build_filename(g_get_home_dir(), ".local/share/applications", NULL);
load_desktop_files(path); load_desktop_files(path);
g_free(path); g_free(path);

View File

@@ -127,6 +127,7 @@ extern GtkWidget *launcher_background;
extern GtkWidget *startup_notifications; extern GtkWidget *startup_notifications;
extern IconThemeWrapper *icon_theme; extern IconThemeWrapper *icon_theme;
extern GtkWidget *launcher_tooltip; extern GtkWidget *launcher_tooltip;
extern GtkWidget *launcher_icon_theme_override;
void load_desktop_file(const char *file, gboolean selected); void load_desktop_file(const char *file, gboolean selected);
void set_current_icon_theme(const char *theme); void set_current_icon_theme(const char *theme);

View File

@@ -1,4 +1,3 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@@ -469,6 +468,7 @@ void config_write_launcher(FILE *fp)
g_free(icon_theme); g_free(icon_theme);
icon_theme = NULL; icon_theme = NULL;
} }
fprintf(fp, "launcher_icon_theme_override = %d\n", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(launcher_icon_theme_override)) ? 1 : 0);
fprintf(fp, "startup_notifications = %d\n", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(startup_notifications)) ? 1 : 0); fprintf(fp, "startup_notifications = %d\n", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(startup_notifications)) ? 1 : 0);
fprintf(fp, "launcher_tooltip = %d\n", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(launcher_tooltip)) ? 1 : 0); fprintf(fp, "launcher_tooltip = %d\n", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(launcher_tooltip)) ? 1 : 0);
@@ -624,6 +624,8 @@ void config_save_file(const char *path) {
unsigned short checksum = 0; unsigned short checksum = 0;
fprintf(fp, "#---- Generated by tint2conf %04x ----\n", checksum); fprintf(fp, "#---- Generated by tint2conf %04x ----\n", checksum);
fprintf(fp, "# See https://gitlab.com/o9000/tint2/wikis/Configure for \n");
fprintf(fp, "# full documentation of the configuration options.\n");
config_write_backgrounds(fp); config_write_backgrounds(fp);
config_write_panel(fp); config_write_panel(fp);
@@ -1283,6 +1285,9 @@ void add_entry(char *key, char *value)
else if (strcmp(key, "launcher_icon_theme") == 0) { else if (strcmp(key, "launcher_icon_theme") == 0) {
set_current_icon_theme(value); set_current_icon_theme(value);
} }
else if (strcmp(key, "launcher_icon_theme_override") == 0) {
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(launcher_icon_theme_override), atoi(value));
}
else if (strcmp(key, "launcher_tooltip") == 0) { else if (strcmp(key, "launcher_tooltip") == 0) {
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(launcher_tooltip), atoi(value)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(launcher_tooltip), atoi(value));
} }

View File

@@ -1,148 +1,58 @@
[Desktop Entry] [Desktop Entry]
Type=Application Type=Application
Name=Panel tint2 Name=Tint2 panel settings
Name[am]=ፓነል tint2 Name[am]=ፓነል አስተዳዳሪ
Name[ar]=الشريط tint2 Name[ar]=مدير الائحة :
Name[ast]=Panel tint2 Name[ast]=Alministrador de panel
Name[be]=Панэль tint2 Name[be]=Кіраўнік Панэляў
Name[ca]=Quadre tint2 Name[ca]=Gestor de quadres
Name[cs]=Panel tint2 Name[cs]=Správce panelu
Name[da]=Panel tint2 Name[da]=Panelhåndtering
Name[de]=Leiste tint2 Name[de]=Leistenverwaltung
Name[dz]=པེ་ནཱལ། tint2 Name[dz]=པེ་ནཱལ་འཛིན་སྐྱོང་པ།
Name[el]=Ταμπλό tint2 Name[el]=Διαχειριστής ταμπλό
Name[en_GB]=Panel tint2 Name[en_GB]=Panel Manager
Name[eo]=Panelo tint2 Name[eo]=Administrilo de Panelo
Name[es]=Panel tint2 Name[es]=Administrador de panel
Name[et]=Ääreriba tint2 Name[et]=Paneelihaldur
Name[eu]=Panela tint2 Name[eu]=Panel Kudeatzailea:
Name[fi]=Paneeli tint2 Name[fi]=Paneelin hallinta
Name[fr]=Panneau tint2 Name[fr]=Gestionnaire de panneau
Name[gl]=Panel tint2 Name[gl]=Xestor de paneis
Name[he]=לוח tint2 Name[he]=מנהל הלוח
Name[hu]=Panel tint2 Name[hu]=Panelkezelő
Name[id]=Panel tint2 Name[id]=Manajer Panel
Name[it]=Pannello tint2 Name[it]=Gestore dei pannelli
Name[ja]=パネル tint2 Name[ja]=パネルマネージャ
Name[kk]=Панель tint2 Name[kk]=Панель менеджері
Name[ko]=패널 tint2 Name[ko]=패널 관리자
Name[ku]=Panel tint2 Name[ku]=Gerinendeyê panelan
Name[lv]=Panelis tint2 Name[lv]=Paneļu pārvaldnieks
Name[mk]=Панел tint2 Name[mk]=Менаџер за панели
Name[nb]=Panel tint2 Name[nb]=Panelbehandler
Name[nl]=Paneel tint2 Name[nl]=Paneel Manager
Name[nn]=Panel tint2 Name[nn]=Panelhandsamar
Name[pa]=ਪੈਨਲ tint2 Name[pa]=ਪੈਨਲ ਮੈਨੇਜਰ
Name[pl]=Panel tint2 Name[pl]=Panel
Name[pt]=Painel tint2 Name[pt]=Gestor do Painel
Name[pt_BR]=Painel tint2 Name[pt_BR]=Gerenciador do painel
Name[ro]=Panou tint2 Name[ro]=Manager de panouri
Name[ru]=Панель tint2 Name[ru]=Диспетчер панелей
Name[si]=පුවරුව tint2 Name[si]=පුවරු කළමණාකරු
Name[sk]=Panel tint2 Name[sk]=Nastavenie panelu
Name[sq]=Panel tint2 Name[sq]=Përgjegjës Panelesh
Name[sv]=Panel tint2 Name[sv]=Panelhanterare
Name[ta]=பலகை tint2 Name[ta]=பலகை மேளாலர்:
Name[tr]=Panel tint2 Name[tr]=Panel Yöneticisi
Name[ug]=panel tint2 Name[ug]=Panel باشقۇرغۇ
Name[uk]=Панель tint2 Name[uk]=Менеджер панелей
Name[ur]=پینل tint2 Name[ur]=پینل منیجر
Name[ur_PK]=پینل tint2 Name[ur_PK]=پینل منیجر
Name[vi]=Panel tint2 Name[vi]=Quản lý panel
Name[zh_CN]=面板 tint2 Name[zh_CN]=面板管理器
Name[zh_TW]=面板 tint2 Name[zh_TW]=面板管理程式
GenericName=Panel Manager
GenericName[am]=ፓነል አስተዳዳሪ
GenericName[ar]=مدير الائحة :
GenericName[ast]=Alministrador de panel
GenericName[be]=Кіраўнік Панэляў
GenericName[ca]=Gestor de quadres
GenericName[cs]=Správce panelu
GenericName[da]=Panelhåndtering
GenericName[de]=Leistenverwaltung
GenericName[dz]=པེ་ནཱལ་འཛིན་སྐྱོང་པ།
GenericName[el]=Διαχειριστής ταμπλό
GenericName[en_GB]=Panel Manager
GenericName[eo]=Administrilo de Panelo
GenericName[es]=Administrador de panel
GenericName[et]=Paneelihaldur
GenericName[eu]=Panel Kudeatzailea:
GenericName[fi]=Paneelin hallinta
GenericName[fr]=Gestionnaire de panneau
GenericName[gl]=Xestor de paneis
GenericName[he]=מנהל הלוח
GenericName[hu]=Panelkezelő
GenericName[id]=Manajer Panel
GenericName[it]=Gestore dei pannelli
GenericName[ja]=パネルマネージャ
GenericName[kk]=Панель менеджері
GenericName[ko]=패널 관리자
GenericName[ku]=Gerinendeyê panelan
GenericName[lv]=Paneļu pārvaldnieks
GenericName[mk]=Менаџер за панели
GenericName[nb]=Panelbehandler
GenericName[nl]=Paneel Manager
GenericName[nn]=Panelhandsamar
GenericName[pa]=ਪੈਨਲ ਮੈਨੇਜਰ
GenericName[pl]=Panel
GenericName[pt]=Gestor do Painel
GenericName[pt_BR]=Gerenciador do painel
GenericName[ro]=Manager de panouri
GenericName[ru]=Диспетчер панелей
GenericName[si]=පුවරු කළමණාකරු
GenericName[sk]=Nastavenie panelu
GenericName[sq]=Përgjegjës Panelesh
GenericName[sv]=Panelhanterare
GenericName[ta]=பலகை மேளாலர்:
GenericName[tr]=Panel Yöneticisi
GenericName[ug]=Panel باشقۇرغۇ
GenericName[uk]=Менеджер панелей
GenericName[ur]=پینل منیجر
GenericName[ur_PK]=پینل منیجر
GenericName[vi]=Quản lý panel
GenericName[zh_CN]=面板管理器
GenericName[zh_TW]=面板管理程式
Comment=Customize the panel settings
Comment[ast]=Personalice la configuración del panel
Comment[ca]=Personalitza els ajustaments del quadre
Comment[cs]=Přizpůsobit nastavení panelu
Comment[da]=Tilpas panelets indstillinger
Comment[de]=Leiste anpassen
Comment[el]=Προσαρμογή ρυθμίσεων ταμπλό
Comment[en_GB]=Customise the panel settings
Comment[es]=Personalice la configuración del panel
Comment[et]=Ääreriba seadistamine käepäraseks
Comment[eu]=Pertsonalizatu panel ezapenak
Comment[fi]=Mukauta paneelin asetuksia
Comment[fr]=Configurer le panneau
Comment[gl]=Personalizar a configuración do panel
Comment[hu]=A panel beállításainak személyre szabása
Comment[id]=Kustomisasi pengaturan panel
Comment[it]=Personalizzazione delle impostazioni del pannello
Comment[ja]=パネルの設定をカスタマイズします
Comment[kk]=Панельді баптау
Comment[lv]=Pielāgot paneļa uzstādījumus
Comment[nb]=Tilpass panelet
Comment[nl]=Paneel configureren
Comment[nn]=Tilpass innstillingane for panelet
Comment[pl]=Konfiguruje ustawienia paneli
Comment[pt]=Personalizar as definições do painel
Comment[pt_BR]=Personalizar as configurações do painel
Comment[ro]=Schimbați opțiunile panoului
Comment[ru]=Настроить панель
Comment[si]=පුවරු සිටුවම් සකසන්න
Comment[sk]=Prispôsobiť nastavenia panelu
Comment[sq]=Përshtasni rregullimet për panelin
Comment[sv]=Anpassa panelinställningarna
Comment[ta]=நிரல்பலகை அமைப்பை தன்விருப்பமாற்றம் செய்க
Comment[tr]=Panel ayarlarını özelleştir
Comment[ug]=panel تەڭشىكىنى Customize قىلىش
Comment[uk]=Налаштувати властивості панелі
Comment[ur]=پینل کی ترتیبات
Comment[ur_PK]=پینل کی ترتیبات
Comment[zh_CN]=自定义面板设置
Exec=tint2conf Exec=tint2conf
Icon=taskbar Icon=tint2conf
Terminal=false Terminal=false
Categories=Settings;DesktopSettings; Categories=Settings;DesktopSettings;

509
src/tint2conf/tint2conf.svg Normal file
View File

@@ -0,0 +1,509 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
width="48"
height="48"
id="svg1325"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="tint2conf.svg"
inkscape:export-filename="/home/omega_dist/4_devel_open_source/9_tint/tint2/src/tint2conf/tint2conf.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<metadata
id="metadata50">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1768"
inkscape:window-height="1056"
id="namedview48"
showgrid="false"
inkscape:zoom="16"
inkscape:cx="30.824904"
inkscape:cy="2.1959811"
inkscape:window-x="152"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="g3841" />
<defs
id="defs1327">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 24 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="48 : 24 : 1"
inkscape:persp3d-origin="24 : 16 : 1"
id="perspective52" />
<linearGradient
id="linearGradient4708">
<stop
id="stop4710"
style="stop-color:white;stop-opacity:1"
offset="0" />
<stop
id="stop4712"
style="stop-color:black;stop-opacity:1"
offset="0.57954973" />
<stop
id="stop4714"
style="stop-color:black;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
id="linearGradient2270">
<stop
id="stop2272"
style="stop-color:white;stop-opacity:1"
offset="0" />
<stop
id="stop2274"
style="stop-color:white;stop-opacity:0"
offset="1" />
</linearGradient>
<linearGradient
x1="20"
y1="18"
x2="20"
y2="46"
id="linearGradient2851"
xlink:href="#linearGradient2270"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(0,-9.9999992)" />
<linearGradient
x1="30"
y1="17"
x2="30"
y2="47"
id="linearGradient2854"
xlink:href="#linearGradient2181"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(0,-9.9999992)" />
<linearGradient
x1="63.397362"
y1="-12.489107"
x2="63.397362"
y2="5.4675598"
id="linearGradient2685"
xlink:href="#linearGradient4873"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.5436509,0,0,1.5436158,-80.015712,21.419381)" />
<linearGradient
id="linearGradient4873">
<stop
id="stop4875"
style="stop-color:white;stop-opacity:1"
offset="0" />
<stop
id="stop4877"
style="stop-color:white;stop-opacity:0"
offset="1" />
</linearGradient>
<radialGradient
cx="23.895569"
cy="3.9900031"
r="20.397499"
fx="23.895569"
fy="3.9900031"
id="radialGradient2688"
xlink:href="#linearGradient3242-187-536"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0,1.7008781,-2.245129,0,24.958071,-40.236051)" />
<linearGradient
id="linearGradient3242-187-536">
<stop
id="stop2778"
style="stop-color:#8badea;stop-opacity:1"
offset="0" />
<stop
id="stop2780"
style="stop-color:#6396cd;stop-opacity:1"
offset="0.26238" />
<stop
id="stop2782"
style="stop-color:#3b7caf;stop-opacity:1"
offset="0.66093999" />
<stop
id="stop2784"
style="stop-color:#194c70;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
x1="18.379412"
y1="44.980297"
x2="18.379412"
y2="3.0816143"
id="linearGradient2690"
xlink:href="#linearGradient2490-182-124"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.7126612,0,0,0.7126613,-1.1038706,-1.1038704)" />
<linearGradient
id="linearGradient2490-182-124">
<stop
id="stop2788"
style="stop-color:#1f4b6a;stop-opacity:1"
offset="0" />
<stop
id="stop2790"
style="stop-color:#4083c2;stop-opacity:1"
offset="1" />
</linearGradient>
<radialGradient
cx="62.625"
cy="4.625"
r="10.625"
fx="62.625"
fy="4.625"
id="radialGradient2693"
xlink:href="#linearGradient8838"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.5058824,0,0,0.37647,-78.305888,26.258824)" />
<linearGradient
id="linearGradient8838">
<stop
id="stop8840"
style="stop-color:black;stop-opacity:1"
offset="0" />
<stop
id="stop8842"
style="stop-color:black;stop-opacity:0"
offset="1" />
</linearGradient>
<linearGradient
id="linearGradient2181">
<stop
id="stop2183"
style="stop-color:#f0f0f0;stop-opacity:1"
offset="0" />
<stop
id="stop2185"
style="stop-color:#d3d3d3;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
x1="50.23077"
y1="22"
x2="53"
y2="22"
id="linearGradient4720"
xlink:href="#linearGradient4708"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(4.3333333,0,0,1,-176.66667,0)" />
<mask
id="mask4716">
<rect
width="52"
height="32"
x="1"
y="6"
id="rect4718"
style="fill:url(#linearGradient4720);fill-opacity:1;stroke:none" />
</mask>
<linearGradient
x1="50.23077"
y1="22"
x2="53"
y2="22"
id="linearGradient4726"
xlink:href="#linearGradient4708"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(4.3333333,0,0,1,-176.66667,0)" />
<mask
id="mask4722">
<rect
width="52"
height="32"
x="1"
y="6"
id="rect4724"
style="fill:url(#linearGradient4726);fill-opacity:1;stroke:none" />
</mask>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4873"
id="linearGradient2861"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.8085571,0,0,0.74493792,-86.459085,24.622683)"
x1="63.397362"
y1="-12.489107"
x2="63.397362"
y2="5.4675598" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3242-187-536"
id="radialGradient2864"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0,0.82083158,-2.630416,0,36.52927,-5.1317867)"
cx="23.895569"
cy="3.9900031"
fx="23.895569"
fy="3.9900031"
r="20.397499" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2490-182-124"
id="linearGradient2866"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.83496113,0,0,0.34392523,5.994833,13.753123)"
x1="18.379412"
y1="44.980297"
x2="18.379412"
y2="3.0816143" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient8838"
id="radialGradient2869"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.7643072,0,0,0.18168172,-84.455838,26.958163)"
cx="62.625"
cy="4.625"
fx="62.625"
fy="4.625"
r="10.625" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient8838"
id="radialGradient2876"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.7643072,0,0,0.18168172,-84.455838,26.958163)"
cx="62.625"
cy="4.625"
fx="62.625"
fy="4.625"
r="10.625" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3242-187-536"
id="radialGradient2878"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0,0.82083158,-2.630416,0,36.52927,-5.1317867)"
cx="23.895569"
cy="3.9900031"
fx="23.895569"
fy="3.9900031"
r="20.397499" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2490-182-124"
id="linearGradient2880"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.83496113,0,0,0.34392523,5.994833,13.753123)"
x1="18.379412"
y1="44.980297"
x2="18.379412"
y2="3.0816143" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4873"
id="linearGradient2882"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.8085571,0,0,0.74493792,-86.459085,24.622683)"
x1="63.397362"
y1="-12.489107"
x2="63.397362"
y2="5.4675598" />
<inkscape:perspective
id="perspective2924"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<linearGradient
x1="30"
y1="17"
x2="30"
y2="47"
id="linearGradient2854-0"
xlink:href="#linearGradient2181-7"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(0,-9.9999992)" />
<linearGradient
id="linearGradient2181-7">
<stop
id="stop2183-8"
style="stop-color:#f0f0f0;stop-opacity:1"
offset="0" />
<stop
id="stop2185-6"
style="stop-color:#d3d3d3;stop-opacity:1"
offset="1" />
</linearGradient>
<mask
id="mask4722-8">
<rect
width="52"
height="32"
x="1"
y="6"
id="rect4724-8"
style="fill:url(#linearGradient4726-4);fill-opacity:1;stroke:none" />
</mask>
<linearGradient
x1="50.23077"
y1="22"
x2="53"
y2="22"
id="linearGradient4726-4"
xlink:href="#linearGradient4708-3"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(4.3333333,0,0,1,-176.66667,0)" />
<linearGradient
id="linearGradient4708-3">
<stop
id="stop4710-1"
style="stop-color:white;stop-opacity:1"
offset="0" />
<stop
id="stop4712-4"
style="stop-color:black;stop-opacity:1"
offset="0.57954973" />
<stop
id="stop4714-9"
style="stop-color:black;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
y2="47"
x2="30"
y1="17"
x1="30"
gradientTransform="translate(0,-9.9999992)"
gradientUnits="userSpaceOnUse"
id="linearGradient2940"
xlink:href="#linearGradient2181-7"
inkscape:collect="always" />
<inkscape:perspective
id="perspective2894"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
</defs>
<rect
width="46"
height="29"
x="2.5"
y="7.5"
mask="url(#mask4722)"
id="rect1333"
style="fill:url(#linearGradient2854);fill-opacity:1;stroke:#2c2c2c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
transform="translate(-0.20338983,3.4237288)" />
<rect
width="45"
height="27"
x="3.5"
y="8.5"
mask="url(#mask4716)"
id="rect2210"
style="opacity:0.7;fill:none;stroke:url(#linearGradient2851);stroke-width:0.99999976;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
transform="translate(-0.20338983,3.4237288)" />
<rect
style="fill:#ffffff;fill-opacity:1;stroke:#333424;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0.69999999999999996"
id="rect6306"
width="29.45332"
height="9.5719652"
x="10.697065"
y="21.044527"
rx="1.4456253"
ry="1.6443363" />
<g
id="g3841"
transform="translate(130.875,44.5)">
<path
sodipodi:nodetypes="csscccsscc"
inkscape:connector-curvature="0"
id="path3833"
d="M -71.433946,14.735703 C -80.071947,4.6612321 -89.248707,-5.737975 -92.147263,-9.1977463 c -3.224562,-3.8488997 -3.263797,-3.3549747 -1.493188,-4.5254517 l 1.278694,-0.845292 14.113986,16.2862263 14.113987,16.2862257 -1.004295,0.889458 c -0.552362,0.489201 -1.149443,0.973153 -1.326848,1.075448 -0.259255,0.149489 -1.234399,-0.877491 -4.969019,-5.233165 z"
style="fill:#87aade" />
<path
sodipodi:nodetypes="cscsssc"
inkscape:connector-curvature="0"
id="path3825"
d="m -98.105823,-13.116897 c -0.09278,-0.307786 -1.541317,-8.963836 -1.697567,-8.726554 -0.0244,0.03706 7.876058,3.167414 7.876435,3.661796 0.27526,-0.22635 0.628731,0.02647 0.174381,0.954172 -0.406614,0.830238 -0.712942,1.441488 -2.270947,2.615226 -0.993109,0.748168 -2.553662,1.682052 -2.971367,1.846131 -0.688741,0.270545 -1.081414,0.266981 -1.110935,-0.350771 z"
style="fill:#e9c6af" />
<path
sodipodi:nodetypes="scscscsss"
inkscape:connector-curvature="0"
id="path3831"
d="m -77.291221,0.7427987 -14.60455,-16.3513767 0.637035,-0.730536 c 0.266185,-0.305255 0.324002,-1.389769 0.39974,-1.43161 0.07574,-0.04184 6.588518,8.0823714 14.511041,17.25171965 l 14.404588,16.67154235 -0.456991,0.486444 c -0.251345,0.267543 -0.509994,0.486443 -0.574776,0.486443 -0.06478,0 -6.507022,-7.3721814 -14.316087,-16.3826263 z"
style="fill:#afc6e9" />
<path
sodipodi:nodetypes="sssssscs"
inkscape:connector-curvature="0"
id="path3835"
d="m -72.642373,17.731344 c -15.785516,-18.3468257 -22.67882,-27.078419 -24.317731,-29.175546 -0.237129,-0.303427 -0.02287,-0.396673 0.25262,-0.547032 0.446221,-0.24354 0.48891,-0.24519 1.064375,0.556916 0.626398,0.873099 10.342493,12.0396466 21.114327,24.608034 6.242539,7.283685 7.651572,8.214809 7.295404,8.484526 -0.209506,0.158654 -1.332932,1.444171 -1.357614,0.66226 -0.39968,0.56189 -2.205614,-2.443908 -4.051381,-4.589158 z"
style="fill:#3771c8" />
<path
inkscape:connector-curvature="0"
id="path3837"
d="m -99.864407,-18.915254 3.050848,-2.237288"
style="fill:#0b2822;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
sodipodi:nodetypes="cccc"
inkscape:connector-curvature="0"
id="path3049"
d="m -98.144068,-11.76536 29.460805,34.842161 7.728814,-6.711865 -29.898305,-34.576271"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
sodipodi:nodetypes="cccccc"
inkscape:connector-curvature="0"
id="path3823"
d="m -98.112288,-12.03125 2.174788,-0.688559 3.864407,-2.847458 1.079449,-2.691208 -9.621826,-4.630826 z"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
sodipodi:nodetypes="ccscccsscc"
inkscape:connector-curvature="0"
id="path3827"
d="m -80.955348,4.2773755 c -7.750968,-9.0443333 -14.97509,-16.8628515 -14.945966,-16.9543465 0.02912,-0.09149 1.512719,-0.624766 2.1979,-1.135322 l 1.426197,-1.062718 14.171177,16.60582 14.202426,16.387071 -0.88474,0.775212 c -0.486606,0.426368 -1.11724,0.948927 -1.401408,1.161244 l -0.516667,0.386032 z"
style="fill:#5f8dd3" />
<path
inkscape:connector-curvature="0"
id="path3829"
d="m -83.124992,5.0906125 c -7.869016,-9.1612493 -14.285686,-16.7328745 -14.259267,-16.8258325 0.02642,-0.09296 0.288522,-0.270134 0.582452,-0.393722 0.525603,-0.220999 0.770084,0.05025 14.820977,16.4434263 l 14.286559,16.6681317 -0.492096,0.387084 c -0.270652,0.212894 -0.523421,0.384976 -0.561709,0.382405 -0.03829,-0.0026 -6.507899,-7.500244 -14.376916,-16.6614925 l 0,0 z"
style="fill:#3771c8" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path3051"
d="m -96.265889,-12.891949 29.350635,34.044492"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path3053"
d="m -92.338983,-15.661017 29.084746,33.559322"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
sodipodi:nodetypes="scscccccs"
inkscape:connector-curvature="0"
id="path3839"
d="m -100.69352,-20.893751 c -0.0917,-0.34644 -0.71612,-3.00338 -0.8271,-3.157561 0.0437,-0.0437 2.636115,1.39898 2.993406,1.577103 l 1.143051,0.524237 -0.435163,0.963572 -0.709103,0.627398 -0.787319,0.476477 -1.110472,0.181053 c 0.17185,0.510627 -0.0972,-0.549821 -0.2673,-1.192279 z"
style="fill:#5f8dd3;fill-opacity:1" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -363,24 +363,30 @@ void createHeuristicMask(DATA32* data, int w, int h)
} }
void render_image(Drawable d, int x, int y, int w, int h) void render_image(Drawable d, int x, int y)
{ {
// in real_transparency mode imlib_render_image_on_drawable does not the right thing, because int w = imlib_image_get_width(), h = imlib_image_get_height();
// the operation is IMLIB_OP_COPY, but we would need IMLIB_OP_OVER (which does not exist)
// Therefore we have to do it with the XRender extension (i.e. copy what imlib is doing internally) Pixmap pixmap = XCreatePixmap(server.dsp, server.root_win, w, h, 32);
// But first we need to render the image onto itself with PictOpIn to adjust the colors to the alpha channel imlib_context_set_drawable(pixmap);
Pixmap pmap_tmp = XCreatePixmap(server.dsp, server.root_win, w, h, 32);
imlib_context_set_drawable(pmap_tmp);
imlib_context_set_blend(0); imlib_context_set_blend(0);
imlib_render_image_on_drawable(0, 0); imlib_render_image_on_drawable(0, 0);
Picture pict_image = XRenderCreatePicture(server.dsp, pmap_tmp, XRenderFindStandardFormat(server.dsp, PictStandardARGB32), 0, 0);
Pixmap mask = XCreatePixmap(server.dsp, server.root_win, w, h, 32);
imlib_context_set_drawable(mask);
imlib_context_set_blend(0);
imlib_render_image_on_drawable(0, 0);
Picture pict = XRenderCreatePicture(server.dsp, pixmap, XRenderFindStandardFormat(server.dsp, PictStandardARGB32), 0, 0);
Picture pict_drawable = XRenderCreatePicture(server.dsp, d, XRenderFindVisualFormat(server.dsp, server.visual), 0, 0); Picture pict_drawable = XRenderCreatePicture(server.dsp, d, XRenderFindVisualFormat(server.dsp, server.visual), 0, 0);
XRenderComposite(server.dsp, PictOpIn, pict_image, None, pict_image, 0, 0, 0, 0, 0, 0, w, h); Picture pict_mask = XRenderCreatePicture(server.dsp, mask, XRenderFindStandardFormat(server.dsp, PictStandardARGB32), 0, 0);
XRenderComposite(server.dsp, PictOpOver, pict_image, None, pict_drawable, 0, 0, 0, 0, x, y, w, h); XRenderComposite(server.dsp, PictOpOver, pict, pict_mask, pict_drawable, 0, 0, 0, 0, x, y, w, h);
imlib_context_set_blend(1);
XFreePixmap(server.dsp, pmap_tmp); XRenderFreePicture(server.dsp, pict_mask);
XRenderFreePicture(server.dsp, pict_image);
XRenderFreePicture(server.dsp, pict_drawable); XRenderFreePicture(server.dsp, pict_drawable);
XRenderFreePicture(server.dsp, pict);
XFreePixmap(server.dsp, mask);
XFreePixmap(server.dsp, pixmap);
} }
void draw_text(PangoLayout *layout, cairo_t *c, int posx, int posy, Color *color, int font_shadow) void draw_text(PangoLayout *layout, cairo_t *c, int posx, int posy, Color *color, int font_shadow)

View File

@@ -6,7 +6,6 @@
#ifndef COMMON_H #ifndef COMMON_H
#define COMMON_H #define COMMON_H
#define WM_CLASS_TINT "panel" #define WM_CLASS_TINT "panel"
#include <Imlib2.h> #include <Imlib2.h>
@@ -64,7 +63,7 @@ void extract_values (const char *value, char **value1, char **value2, char **val
void adjust_asb(DATA32 *data, int w, int h, int alpha, float satur, float bright); void adjust_asb(DATA32 *data, int w, int h, int alpha, float satur, float bright);
void createHeuristicMask(DATA32* data, int w, int h); void createHeuristicMask(DATA32* data, int w, int h);
void render_image(Drawable d, int x, int y, int w, int h); void render_image(Drawable d, int x, int y);
void draw_text(PangoLayout *layout, cairo_t *c, int posx, int posy, Color *color, int font_shadow); void draw_text(PangoLayout *layout, cairo_t *c, int posx, int posy, Color *color, int font_shadow);

60
tint2.desktop Normal file
View File

@@ -0,0 +1,60 @@
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Tint2 panel
Name[am]=ፓነል tint2
Name[ar]=الشريط tint2
Name[ast]=Panel tint2
Name[be]=Панэль tint2
Name[ca]=Quadre tint2
Name[cs]=Panel tint2
Name[da]=Panel tint2
Name[de]=Leiste tint2
Name[dz]=པེ་ནཱལ། tint2
Name[el]=Ταμπλό tint2
Name[en_GB]=Panel tint2
Name[eo]=Panelo tint2
Name[es]=Panel tint2
Name[et]=Ääreriba tint2
Name[eu]=Panela tint2
Name[fi]=Paneeli tint2
Name[fr]=Panneau tint2
Name[gl]=Panel tint2
Name[he]=לוח tint2
Name[hu]=Panel tint2
Name[id]=Panel tint2
Name[it]=Pannello tint2
Name[ja]=パネル tint2
Name[kk]=Панель tint2
Name[ko]=패널 tint2
Name[ku]=Panel tint2
Name[lv]=Panelis tint2
Name[mk]=Панел tint2
Name[nb]=Panel tint2
Name[nl]=Paneel tint2
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
Name[sk]=Panel tint2
Name[sq]=Panel tint2
Name[sv]=Panel tint2
Name[ta]=பலகை tint2
Name[tr]=Panel tint2
Name[ug]=panel tint2
Name[uk]=Панель tint2
Name[ur]=پینل tint2
Name[ur_PK]=پینل tint2
Name[vi]=Panel tint2
Name[zh_CN]=面板 tint2
Name[zh_TW]=面板 tint2
Comment=Lightweight panel
Comment[fr_FR]=Panel léger
Exec=tint2
Icon=taskbar
Terminal=false
Categories=System;

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB