├── .gitignore ├── AUTHORS ├── COPYING ├── Makefile.am ├── NEWS ├── README.md ├── TODO ├── autogen.sh ├── common ├── Makefile.am ├── mypixmap.c ├── mypixmap.h ├── theme.c ├── theme.h ├── ui_style.c ├── ui_style.h ├── wck-plugin.c ├── wck-plugin.h ├── wck-utils.c └── wck-utils.h ├── configure.ac.in ├── debian ├── changelog ├── compat ├── control ├── copyright ├── rules └── source │ └── format ├── icons ├── 48x48 │ ├── Makefile.am │ ├── wckbuttons-plugin.png │ └── windowck-plugin.png └── Makefile.am ├── panel-plugin ├── Makefile.am ├── buttons │ ├── Makefile.am │ ├── wckbuttons-dialogs.c │ ├── wckbuttons-dialogs.glade │ ├── wckbuttons-dialogs.h │ ├── wckbuttons-theme.c │ ├── wckbuttons-theme.h │ ├── wckbuttons.c │ ├── wckbuttons.desktop.in │ └── wckbuttons.h └── title │ ├── Makefile.am │ ├── windowck-dialogs.c │ ├── windowck-dialogs.glade │ ├── windowck-dialogs.h │ ├── windowck-plugin.desktop.in │ ├── windowck-title.c │ ├── windowck-title.h │ ├── windowck.c │ └── windowck.h ├── po ├── POTFILES.in ├── cs.po ├── fr.po ├── it.po ├── ru_RU.po ├── tr.po ├── xfce4-windowck-plugin.pot └── zh_CN.po ├── reloadPlugins.sh └── themes ├── Makefile.am ├── windowck-dark ├── Makefile.am ├── unity │ ├── Makefile.am │ └── generator.py └── xfwm4 │ ├── Makefile.am │ ├── generator.py │ └── themerc └── windowck ├── Makefile.am ├── unity ├── Makefile.am └── generator.py └── xfwm4 ├── Makefile.am ├── generator.py └── themerc /.gitignore: -------------------------------------------------------------------------------- 1 | *.gmo 2 | *.la 3 | *.lo 4 | *.swp 5 | *.tar.* 6 | .deps 7 | .libs 8 | ChangeLog 9 | INSTALL 10 | Makefile 11 | Makefile.in 12 | aclocal.m4 13 | autom4te.cache 14 | compile 15 | config* 16 | debian/control.save 17 | debian/files 18 | debian/xfce4-windowck-plugin* 19 | depcomp 20 | install-sh 21 | intltool* 22 | libtool 23 | ltmain.sh 24 | missing 25 | mkinstalldirs 26 | panel-plugin/*/*.desktop 27 | panel-plugin/*/*-dialogs_ui.h 28 | po/.intltool-merge-cache 29 | po/Makefile.in.in 30 | po/POTFILES 31 | stamp-* 32 | po/*.mo 33 | themes/**/*.png 34 | themes/**/*.xpm 35 | arch/* 36 | !arch/PKGBUILD 37 | !arch/.SRCINFO 38 | .idea/** 39 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Alessio Piccoli 2 | Porting to XFCE of 'GNOME Window Applet'. 3 | 4 | Cedric Leporcq 5 | Adding several improvments and bugfix. 6 | 7 | Felix Krull 8 | Debian packaging support 9 | 10 | Pavel Zlámal 11 | Adding Czech translation 12 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | AUTOMAKE_OPTIONS = foreign 2 | 3 | SUBDIRS = \ 4 | common \ 5 | panel-plugin \ 6 | icons \ 7 | themes \ 8 | po 9 | 10 | distclean-local: 11 | rm -rf *.cache *~ 12 | 13 | rpm: dist 14 | rpmbuild -ta $(PACKAGE)-$(VERSION).tar.gz 15 | @rm -f $(PACKAGE)-$(VERSION).tar.gz 16 | 17 | .PHONY: ChangeLog 18 | 19 | ChangeLog: Makefile 20 | (GIT_DIR=$(top_srcdir)/.git git log > .changelog.tmp \ 21 | && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) \ 22 | || (touch ChangeLog; echo 'Git directory not found: installing possibly empty changelog.' >&2) 23 | 24 | dist-hook: ChangeLog 25 | 26 | EXTRA_DIST = \ 27 | intltool-extract.in \ 28 | intltool-merge.in \ 29 | intltool-update.in 30 | 31 | DISTCLEANFILES = \ 32 | intltool-extract \ 33 | intltool-merge \ 34 | intltool-update 35 | 36 | # vi:set ts=8 sw=8 noet ai nocindent syntax=automake: 37 | -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- 1 | 0.4.6 2 | Fix #51: Build warnings 3 | Fix #56: add some checks while processing changes of unfocused window title 4 | 0.4.5 5 | Fix #28 - Updated deb packages dependency for ubuntu 15.10+ 6 | 0.4.4 7 | Fix #22 support of *.svg based unity themes 8 | 0.4.3 9 | Fix #21 disable activate mouse action on desktop 10 | properly hide title on desktop #21 11 | 0.4.2 12 | ReAdd missing themerc from windowck themes 13 | 0.4.1 14 | Add missing dependency in PKGBUILD 15 | Update debian packaging 16 | Remove *.xpm files from source code 17 | 0.4.0 18 | Fix Icon on right behaviour reg. #da3b6c6 19 | Drop xpm support 20 | Improve windowck themes 21 | Added Czech translation 100% 22 | fix #16 Remove background on buttons 23 | fix #14 correctly update title when switching workspace 24 | fix #5 Let windowck plugin skip whiskermenu 25 | 0.3.1 26 | Allow 'Log Out on close desktop' #12 27 | Add multi-arch support to Debian packaging 28 | 0.3.0 29 | Prepare release 0.3.0 30 | Updates french translations (100%) and italian (45%) 31 | Allow title text to be displayed on two lines 32 | Allow resizing the window icon 33 | Fix DEFAULT_SYNC_WM_FONT case formating 34 | Fix #7 Window title widget vertical align 35 | 0.2.5 36 | Add option to sync font with window manager for title plugin 37 | Change show_window_menu option behaviour 38 | Fix gcc warnings 39 | Fix inactive title color for dark themes 40 | 0.2.4 41 | Update plugin when the gtk theme changed 42 | Fix fg color issue with some themes 43 | Fix autogen warnings 44 | 0.2.3 45 | Fix a wrong title display when desktop is shown. 46 | 0.2.2 47 | Fix #2 plugin initialization issue 48 | 0.2.1 49 | Disable actions on desktop window. 50 | Fix wck_utils to properly disconnect signals. 51 | Fix missing PKGBUILD.in. 52 | Fix gcc warnings. 53 | Fix xfwm4 theme loading. 54 | 0.2.0 55 | Provide compatibility with unity button themes. 56 | Add option to sync the theme with the window manager. 57 | Add theme selection and button layout dialog options. 58 | The menu button can show an arrow instead of the window icon. 59 | Add option to show/hide the menu button. 60 | Change dialogs windows appearance. 61 | Fix reloadplugins.sh 62 | 63 | 0.1.3 64 | Backport 0.2.2 updates. 65 | 66 | 0.1.1 67 | Add tooltip on size_mode combobox and correct a misspelling. 68 | Fix maximize button action. 69 | Fix window tracking issue when desktop displayed and others special cases. 70 | Fix theme loading. 71 | Update Italian and French translations. 72 | 73 | 0.1.0 74 | Improve controlled window state tracking. 75 | Add wckbuttons plugin. 76 | Add window actions on buttons and title clicks (activate, (un)maximize, close). 77 | Add window action menu on left button click. 78 | Set inactive title color to fit better to themes. 79 | Add optional custom title font. 80 | Add xfwm4 theme support for buttons. 81 | Add plugins icons and a few themes. 82 | Add window icon to windowck plugin. 83 | Fix title overflow for expand option (use xfce_panel_plugin_set_shrink). 84 | 85 | 0.0.2 86 | Add shrink, fixed and expand title options. 87 | Add title padding and alignment options. 88 | 89 | 0.0.1 90 | Initial release. 91 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # xfce4-windowck-plugin 2 | 3 | Xfce panel plugin which allows to put the maximized window title and windows buttons on the panel. 4 | 5 | Original plugin's features: 6 | 7 | * Show the title and buttons of the maximized window on the panel. 8 | * Allow window actions on buttons and title clicks (activate, (un)maximize, close). 9 | * Allow window action menu on left button click. 10 | * Title formatting options. 11 | * xfwm4/unity theming support for buttons. 12 | 13 | FAQ: 14 | Q: How do I hide the window decorations on maximized windows on Xfce? 15 | A: Xfce 4.12 now support Titileless feature!! Enable it in window manager tweaks → accessibility. 16 | 17 | This code is derived from original 'Window Applets' from Andrej Belcijan. 18 | See http://gnome-look.org/content/show.php?content=103732 for infos. 19 | 20 | # Screenshots 21 | 22 | See [this page](https://goodies.xfce.org/projects/panel-plugins/xfce4-windowck-plugin) for screenshots 23 | 24 | # Installation 25 | 26 | #### Arch Linux 27 | 28 | For Arch Linux users [AUR package](https://aur.archlinux.org/packages/xfce4-windowck-plugin/) is available 29 | 30 | #### Other Linux distributions 31 | 32 | * Install dependencies: 33 | - For debian/ubuntu see debian/control folder and follow debian packaging guidlines 34 | * Generate common makefiles: 35 | ``` 36 | ./autogen.sh --prefix=/usr 37 | ``` 38 | * compile and install the plugin 39 | ```bash 40 | make 41 | sudo make install 42 | ``` 43 | 44 | # How to report bugs? 45 | 46 | Bugs should be reported right to this [GitHub page](https://github.com/nikitabobko/xfce4-windowck-plugin-bobko-mod/issues) 47 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | ideas of extra features to implement : 2 | - add contextual menu like on the tasklist applet 3 | -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright (c) 2002-2012 The Xfce development team. All rights reserved. 4 | # 5 | # This library is free software; you can redistribute it and/or modify it 6 | # under the terms of the GNU General Public License as published by the Free 7 | # Software Foundation; either version 2 of the License, or (at your option) 8 | # any later version. 9 | # 10 | # This library is distributed in the hope that it will be useful, but WITHOUT 11 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 13 | # more details. 14 | # 15 | # You should have received a copy of the GNU Lesser General Public 16 | # License along with this library; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | # 19 | # Written for Xfce by Benedikt Meurer . 20 | # 21 | 22 | (type xdt-autogen) >/dev/null 2>&1 || { 23 | cat >&2 < 23 | #include "mypixmap.h" 24 | 25 | GdkPixbuf * 26 | pixbuf_alpha_load (const gchar * dir, const gchar * file) 27 | { 28 | gchar *filepng; 29 | gchar *filename; 30 | int i; 31 | 32 | static const char* image_types[] = { 33 | "svg", 34 | "png", 35 | "gif", 36 | "jpg", 37 | "bmp", 38 | NULL }; 39 | 40 | i = 0; 41 | while ((image_types[i])) 42 | { 43 | filepng = g_strdup_printf ("%s.%s", file, image_types[i]); 44 | filename = g_build_filename (dir, filepng, NULL); 45 | g_free (filepng); 46 | 47 | if (g_file_test (filename, G_FILE_TEST_IS_REGULAR)) 48 | { 49 | return gdk_pixbuf_new_from_file (filename, NULL); 50 | } 51 | g_free (filename); 52 | ++i; 53 | } 54 | return NULL; 55 | } 56 | -------------------------------------------------------------------------------- /common/mypixmap.h: -------------------------------------------------------------------------------- 1 | /* $Id$ 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; either version 2, or (at your option) 6 | any later version. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; if not, write to the Free Software 15 | Foundation, Inc., Inc., 51 Franklin Street, Fifth Floor, Boston, 16 | MA 02110-1301, USA. 17 | 18 | 19 | xfwm4-windowck-plugin - (c) 2013 Cedric leporcq 20 | */ 21 | 22 | #include 23 | #include 24 | 25 | typedef struct 26 | { 27 | gchar *name; 28 | const gchar *value; 29 | } 30 | xfwmColorSymbol; 31 | 32 | GdkPixbuf * pixbuf_load (const gchar *, const gchar *, xfwmColorSymbol *); 33 | GdkPixbuf * pixbuf_alpha_load (const gchar * dir, const gchar * file); 34 | -------------------------------------------------------------------------------- /common/theme.c: -------------------------------------------------------------------------------- 1 | /* $Id$ 2 | * 3 | * This program is free software; you can redistribute it and/or modify 4 | * it under the terms of the GNU General Public License as published by 5 | * the Free Software Foundation; either version 3 of the License, or 6 | * (at your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program; if not, write to the Free Software Foundation, Inc., 15 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | * 17 | * Copyright (C) 2013 Cedric Leporcq 18 | * 19 | * Parts of this code is derived from xfwm4 sources (setting.c) 20 | * 21 | */ 22 | 23 | #include 24 | 25 | #include "theme.h" 26 | 27 | #define UNITY_TEST_FILE_PNG "close_focused_normal.png" 28 | #define UNITY_TEST_FILE_SVG "close_focused_normal.svg" 29 | 30 | 31 | gchar *test_theme_dir (const gchar *theme, const char *themedir, const gchar *file) { 32 | gchar *test_file, *abs_path, *path; 33 | 34 | path = g_build_filename (theme, themedir, file, NULL); 35 | 36 | xfce_resource_push_path (XFCE_RESOURCE_THEMES, 37 | DATADIR G_DIR_SEPARATOR_S "themes"); 38 | test_file = xfce_resource_lookup (XFCE_RESOURCE_THEMES, path); 39 | xfce_resource_pop_path (XFCE_RESOURCE_THEMES); 40 | 41 | g_free (path); 42 | 43 | if (test_file) 44 | { 45 | abs_path = g_path_get_dirname (test_file); 46 | g_free (test_file); 47 | 48 | return abs_path; 49 | } 50 | 51 | return NULL; 52 | } 53 | 54 | 55 | gchar * 56 | get_unity_theme_dir (const gchar *theme, const gchar *default_theme) 57 | { 58 | gchar *abs_path; 59 | 60 | if (g_path_is_absolute (theme)) 61 | { 62 | if (g_file_test (theme, G_FILE_TEST_IS_DIR)) 63 | { 64 | return g_strdup (theme); 65 | } 66 | } 67 | 68 | abs_path = test_theme_dir (theme, "unity", UNITY_TEST_FILE_PNG); 69 | 70 | if (!abs_path) 71 | abs_path = test_theme_dir (theme, "unity", UNITY_TEST_FILE_SVG); 72 | 73 | if (abs_path) 74 | return abs_path; 75 | 76 | /* Pfew, really can't find that theme nowhere! */ 77 | if (default_theme) 78 | return g_build_filename (DATADIR, "themes", default_theme, "unity", NULL); 79 | 80 | return NULL; 81 | } 82 | 83 | 84 | -------------------------------------------------------------------------------- /common/theme.h: -------------------------------------------------------------------------------- 1 | /* $Id$ 2 | * 3 | * This program is free software; you can redistribute it and/or modify 4 | * it under the terms of the GNU General Public License as published by 5 | * the Free Software Foundation; either version 3 of the License, or 6 | * (at your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program; if not, write to the Free Software Foundation, Inc., 15 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | * 17 | * Copyright (C) 2013 Cedric Leporcq 18 | * 19 | * This stuff is mostly derived from xfwm4 sources (setting.c) 20 | * 21 | */ 22 | 23 | #ifndef __THEME_H__ 24 | #define __THEME_H__ 25 | 26 | #include 27 | 28 | /* default settings */ 29 | #define THEMERC "themerc" 30 | 31 | G_BEGIN_DECLS 32 | 33 | gchar *get_unity_theme_dir (const gchar *theme, const gchar *default_path); 34 | gchar *test_theme_dir (const gchar *theme, const char *themedir, const gchar *file); 35 | 36 | G_END_DECLS 37 | 38 | #endif /* !__THEME_H__ */ 39 | -------------------------------------------------------------------------------- /common/ui_style.c: -------------------------------------------------------------------------------- 1 | /* $Id$ 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; either version 2, or (at your option) 6 | any later version. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; if not, write to the Free Software 15 | Foundation, Inc., Inc., 51 Franklin Street, Fifth Floor, Boston, 16 | MA 02110-1301, USA. 17 | 18 | 19 | xfwm4 - (c) 2002-2011 Olivier Fourdan 20 | xfwm4-windowck-plugin - (c) 2013 Cedric leporcq 21 | */ 22 | 23 | #ifdef HAVE_CONFIG_H 24 | #include "config.h" 25 | #endif 26 | 27 | #ifdef HAVE_MEMORY_H 28 | #include 29 | #endif 30 | #include 31 | #ifdef HAVE_STRING_H 32 | #include 33 | #endif 34 | 35 | #include 36 | #include 37 | #include 38 | #include 39 | 40 | #include 41 | #include "ui_style.h" 42 | 43 | char *states[] = { 44 | "normal", "active", "prelight", "selected", "insensitive", NULL 45 | }; 46 | 47 | char *names[] = { 48 | "fg", "bg", "text", "base", "light", "dark", "mid", NULL 49 | }; 50 | 51 | typedef enum { 52 | GTKSTYLE_FG = 0, 53 | GTKSTYLE_BG, 54 | GTKSTYLE_TEXT, 55 | GTKSTYLE_BASE, 56 | GTKSTYLE_LIGHT, 57 | GTKSTYLE_DARK, 58 | GTKSTYLE_MID, 59 | MIX_BG_TEXT, 60 | 61 | COLOR_NAMES 62 | } ColorNames; 63 | 64 | GdkColor shade (GdkColor color, float b) 65 | { 66 | color.red = color.red * b; 67 | color.green = color.green * b; 68 | color.blue = color.blue * b; 69 | 70 | return color; 71 | } 72 | 73 | GdkColor mix (GdkColor color2, GdkColor color1, float a) 74 | { 75 | GdkColor color; 76 | 77 | color.red = color1.red * a + color2.red * (1 - a); 78 | color.green = color1.green * a + color2.green * (1 - a); 79 | color.blue = color1.blue * a + color2.blue * (1 - a); 80 | 81 | return color; 82 | } 83 | 84 | static gint 85 | state_value (const gchar * s) 86 | { 87 | gint u = 0; 88 | 89 | while ((states[u]) && (strcmp (states[u], s))) 90 | { 91 | u++; 92 | } 93 | if (states[u]) 94 | { 95 | return (u); 96 | } 97 | return (0); 98 | } 99 | 100 | static gint 101 | name_value (const gchar * s) 102 | { 103 | gint u = 0; 104 | 105 | while ((names[u]) && (strcmp (names[u], s))) 106 | { 107 | u++; 108 | } 109 | if (names[u]) 110 | { 111 | return (u); 112 | } 113 | return (0); 114 | } 115 | 116 | GdkColor 117 | query_color (GtkWidget * win, GdkColor c) 118 | { 119 | GdkColor real_color; 120 | GdkColormap *cmap; 121 | 122 | cmap = gtk_widget_get_colormap (GTK_WIDGET (win)); 123 | if (cmap && GDK_IS_COLORMAP (cmap)) 124 | { 125 | gdk_colormap_query_color (cmap, c.pixel, &real_color); 126 | return real_color; 127 | } 128 | else 129 | { 130 | return c; 131 | } 132 | } 133 | 134 | static gchar * 135 | print_color (GtkWidget * win, GdkColor color) 136 | { 137 | gchar *s; 138 | s = g_new (gchar, 14); 139 | g_snprintf (s, 14, "#%04x%04x%04x", color.red, color.green, 140 | color.blue); 141 | return s; 142 | } 143 | 144 | static gchar * 145 | print_colors (GtkWidget * win, GdkColor * x, int n) 146 | { 147 | GdkColor color; 148 | color = query_color (win, x[n]); 149 | return print_color(win, color); 150 | } 151 | 152 | static gchar * 153 | print_rc_style (GtkWidget * win, const gchar * name, const gchar * state, 154 | GtkStyle * style) 155 | { 156 | gchar *s; 157 | gint n, m; 158 | 159 | g_return_val_if_fail (state != NULL, NULL); 160 | g_return_val_if_fail (name != NULL, NULL); 161 | 162 | n = state_value (state); 163 | m = name_value (name); 164 | 165 | switch (m) 166 | { 167 | case GTKSTYLE_FG: 168 | s = print_colors (win, style->fg, n); 169 | break; 170 | case GTKSTYLE_BG: 171 | s = print_colors (win, style->bg, n); 172 | break; 173 | case GTKSTYLE_TEXT: 174 | s = print_colors (win, style->text, n); 175 | break; 176 | case GTKSTYLE_BASE: 177 | s = print_colors (win, style->base, n); 178 | break; 179 | case GTKSTYLE_LIGHT: 180 | s = print_colors (win, style->light, n); 181 | break; 182 | case GTKSTYLE_DARK: 183 | s = print_colors (win, style->dark, n); 184 | break; 185 | default: 186 | case GTKSTYLE_MID: 187 | s = print_colors (win, style->mid, n); 188 | break; 189 | } 190 | return (s); 191 | } 192 | 193 | static GtkStyle * 194 | get_ui_style (GtkWidget * win) 195 | { 196 | GtkStyle *style; 197 | 198 | TRACE ("entering get_ui_style"); 199 | 200 | style = gtk_rc_get_style (win); 201 | if (!style) 202 | { 203 | style = gtk_widget_get_style (win); 204 | } 205 | return (style); 206 | } 207 | 208 | gchar * 209 | get_ui_color (GtkWidget * win, const gchar * name, const gchar * state) 210 | { 211 | GtkStyle *style; 212 | gchar *s; 213 | 214 | TRACE ("entering get_ui_color"); 215 | 216 | g_return_val_if_fail (win != NULL, NULL); 217 | g_return_val_if_fail (GTK_IS_WIDGET (win), NULL); 218 | g_return_val_if_fail (GTK_WIDGET_REALIZED (win), NULL); 219 | 220 | style = get_ui_style (win); 221 | s = print_rc_style (win, name, state, style); 222 | TRACE ("%s[%s]=%s", name, state, s); 223 | return (s); 224 | } 225 | 226 | gchar * 227 | mix_bg_fg (GtkWidget * win, const gchar * state, float alpha, float beta) 228 | { 229 | GdkColor color, bgColor, fgColor; 230 | GtkStyle *style; 231 | gchar *s; 232 | gint n; 233 | 234 | TRACE ("entering mix_bg_fg_ui"); 235 | 236 | g_return_val_if_fail (win != NULL, NULL); 237 | g_return_val_if_fail (GTK_IS_WIDGET (win), NULL); 238 | g_return_val_if_fail (GTK_WIDGET_REALIZED (win), NULL); 239 | 240 | style = get_ui_style (win); 241 | n = state_value (state); 242 | 243 | bgColor = query_color (win, style->bg[n]); 244 | fgColor = query_color (win, style->fg[n]); 245 | color = shade (mix (bgColor, fgColor, alpha), beta); 246 | s = print_color (win, color); 247 | 248 | TRACE ("mix_bg_fg[%s]=%s", state, s); 249 | return (s); 250 | } 251 | 252 | static GdkGC * 253 | _getUIStyle_gc (const gchar * name, const gchar * state, GtkStyle * style) 254 | { 255 | GdkGC *gc; 256 | gint n, m; 257 | 258 | g_return_val_if_fail (state != NULL, NULL); 259 | g_return_val_if_fail (name != NULL, NULL); 260 | g_return_val_if_fail (style != NULL, NULL); 261 | g_return_val_if_fail (GTK_IS_STYLE(style), NULL); 262 | 263 | n = state_value (state); 264 | m = name_value (name); 265 | 266 | switch (m) 267 | { 268 | case GTKSTYLE_FG: 269 | gc = style->fg_gc[n]; 270 | break; 271 | case GTKSTYLE_BG: 272 | gc = style->bg_gc[n]; 273 | break; 274 | case GTKSTYLE_TEXT: 275 | gc = style->text_gc[n]; 276 | break; 277 | case GTKSTYLE_BASE: 278 | gc = style->base_gc[n]; 279 | break; 280 | case GTKSTYLE_LIGHT: 281 | gc = style->light_gc[n]; 282 | break; 283 | case GTKSTYLE_DARK: 284 | gc = style->dark_gc[n]; 285 | break; 286 | default: 287 | case GTKSTYLE_MID: 288 | gc = style->mid_gc[n]; 289 | break; 290 | } 291 | 292 | return (gc); 293 | } 294 | 295 | GdkGC * 296 | getUIStyle_gc (GtkWidget * win, const gchar * name, const gchar * state) 297 | { 298 | GtkStyle *style; 299 | 300 | TRACE ("entering getUIStyle_gc"); 301 | 302 | g_return_val_if_fail (win != NULL, NULL); 303 | g_return_val_if_fail (GTK_IS_WIDGET (win), NULL); 304 | g_return_val_if_fail (GTK_WIDGET_REALIZED (win), NULL); 305 | 306 | style = gtk_rc_get_style (win); 307 | if (!style) 308 | { 309 | style = gtk_widget_get_style (win); 310 | } 311 | if (!style) 312 | { 313 | style = gtk_widget_get_default_style (); 314 | } 315 | return (_getUIStyle_gc (name, state, style)); 316 | } 317 | 318 | PangoFontDescription * 319 | getUIPangoFontDesc (GtkWidget * win) 320 | { 321 | TRACE ("entering getUIPangoFontDesc"); 322 | 323 | g_return_val_if_fail (win != NULL, NULL); 324 | g_return_val_if_fail (GTK_IS_WIDGET (win), NULL); 325 | g_return_val_if_fail (GTK_WIDGET_REALIZED (win), NULL); 326 | 327 | return (win->style->font_desc); 328 | } 329 | 330 | PangoContext * 331 | getUIPangoContext (GtkWidget * win) 332 | { 333 | TRACE ("entering getUIPangoContext"); 334 | 335 | g_return_val_if_fail (win != NULL, NULL); 336 | g_return_val_if_fail (GTK_IS_WIDGET (win), NULL); 337 | g_return_val_if_fail (GTK_WIDGET_REALIZED (win), NULL); 338 | 339 | return (gtk_widget_get_pango_context (win)); 340 | } 341 | -------------------------------------------------------------------------------- /common/ui_style.h: -------------------------------------------------------------------------------- 1 | /* $Id$ 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; either version 2, or (at your option) 6 | any later version. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; if not, write to the Free Software 15 | Foundation, Inc., Inc., 51 Franklin Street, Fifth Floor, Boston, 16 | MA 02110-1301, USA. 17 | 18 | 19 | xfwm4 - (c) 2002-2011 Olivier Fourdan 20 | xfwm4-windowck-plugin - (c) 2013 Cedric leporcq 21 | */ 22 | 23 | #ifndef INC_UI_STYLE_H 24 | #define INC_UI_STYLE_H 25 | 26 | #ifdef HAVE_CONFIG_H 27 | #include "config.h" 28 | #endif 29 | 30 | #include 31 | #include 32 | #include 33 | 34 | GdkColor query_color (GtkWidget * win, GdkColor c); 35 | GdkColor shade (GdkColor color, float s); 36 | GdkColor mix (GdkColor color2, GdkColor color1, float a); 37 | gchar *mix_bg_fg (GtkWidget * win, 38 | const gchar * state, 39 | float alpha, 40 | float beta); 41 | gchar *get_ui_color (GtkWidget *, 42 | const gchar *, 43 | const gchar *); 44 | GdkGC *getUIStyle_gc (GtkWidget *, 45 | const gchar *, 46 | const gchar *); 47 | PangoFontDescription *getUIPangoFontDesc (GtkWidget *); 48 | PangoContext *getUIPangoContext (GtkWidget *); 49 | 50 | #endif /* INC_UI_STYLE_H */ 51 | -------------------------------------------------------------------------------- /common/wck-plugin.c: -------------------------------------------------------------------------------- 1 | /* $Id$ 2 | * 3 | * This program is free software; you can redistribute it and/or modify 4 | * it under the terms of the GNU General Public License as published by 5 | * the Free Software Foundation; either version 3 of the License, or 6 | * (at your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program; if not, write to the Free Software Foundation, Inc., 15 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | * 17 | * Copyright (C) 2013 Cedric Leporcq 18 | * 19 | */ 20 | 21 | #ifdef HAVE_CONFIG_H 22 | #include 23 | #endif 24 | 25 | #include 26 | #include 27 | #include 28 | 29 | #include "wck-plugin.h" 30 | 31 | XfconfChannel * 32 | wck_properties_get_channel (GObject *object_for_weak_ref, const gchar *channel_name) 33 | { 34 | GError *error = NULL; 35 | XfconfChannel *channel; 36 | 37 | g_return_val_if_fail (G_IS_OBJECT (object_for_weak_ref), NULL); 38 | 39 | if (!xfconf_init (&error)) 40 | { 41 | g_critical ("Failed to initialize Xfconf: %s", error->message); 42 | g_error_free (error); 43 | return NULL; 44 | } 45 | 46 | //~ channel = xfconf_channel_get (XFCE_PANEL_CHANNEL_NAME); 47 | channel = xfconf_channel_get (channel_name); 48 | g_object_weak_ref (object_for_weak_ref, (GWeakNotify) xfconf_shutdown, NULL); 49 | 50 | return channel; 51 | } 52 | 53 | 54 | void 55 | wck_about (XfcePanelPlugin *plugin, const gchar *icon_name) 56 | { 57 | /* about dialog code. you can use the GtkAboutDialog 58 | * or the XfceAboutInfo widget */ 59 | GdkPixbuf *icon; 60 | 61 | const gchar *auth[] = 62 | { 63 | "Alessio Piccoli ", 64 | "Cedric Leporcq ", 65 | "Felix Krull ", 66 | "Pavel Zlámal ", 67 | "", 68 | "This code is derived from 'Window Applets' from Andrej Belcijan.", 69 | "See http://gnome-look.org/content/show.php?content=103732 for details.", 70 | NULL 71 | }; 72 | 73 | icon = xfce_panel_pixbuf_from_source(icon_name, NULL, 32); 74 | 75 | gtk_show_about_dialog (NULL, 76 | "logo", icon, 77 | "license", xfce_get_license_text(XFCE_LICENSE_TEXT_GPL), 78 | "version", PACKAGE_VERSION, 79 | "program-name", xfce_panel_plugin_get_display_name (plugin), 80 | "comments", xfce_panel_plugin_get_comment (plugin), 81 | "website", PLUGIN_WEBSITE, 82 | "copyright", "Copyright \302\251 2013-2015\n", 83 | "authors", auth, 84 | NULL ); 85 | // TODO: add translators. 86 | 87 | if (icon) 88 | g_object_unref(G_OBJECT(icon) ); 89 | } 90 | 91 | 92 | GtkWidget *show_refresh_item (XfcePanelPlugin *plugin) 93 | { 94 | GtkWidget *refresh; 95 | refresh = gtk_image_menu_item_new_from_stock (GTK_STOCK_REFRESH, NULL); 96 | xfce_panel_plugin_menu_insert_item(plugin, GTK_MENU_ITEM(refresh)); 97 | gtk_widget_show(GTK_WIDGET(refresh)); 98 | 99 | return refresh; 100 | } 101 | -------------------------------------------------------------------------------- /common/wck-plugin.h: -------------------------------------------------------------------------------- 1 | /* $Id$ 2 | * 3 | * This program is free software; you can redistribute it and/or modify 4 | * it under the terms of the GNU General Public License as published by 5 | * the Free Software Foundation; either version 3 of the License, or 6 | * (at your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program; if not, write to the Free Software Foundation, Inc., 15 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | * 17 | * Copyright (C) 2013 Cedric Leporcq 18 | * 19 | */ 20 | 21 | #ifndef WCK_PLUGIN_H_ 22 | #define WCK_PLUGIN_H_ 23 | 24 | #include 25 | #include 26 | 27 | /* the website url */ 28 | #define PLUGIN_WEBSITE "http://goodies.xfce.org/projects/panel-plugins/xfce4-windowck-plugin" 29 | 30 | G_BEGIN_DECLS 31 | 32 | XfconfChannel * 33 | wck_properties_get_channel (GObject *object_for_weak_ref, const gchar *channel_name); 34 | void wck_about (XfcePanelPlugin *plugin, const gchar *icon_name); 35 | GtkWidget *show_refresh_item (XfcePanelPlugin *plugin); 36 | 37 | G_END_DECLS 38 | 39 | #endif /* WCK_PLUGIN_H_ */ 40 | -------------------------------------------------------------------------------- /common/wck-utils.c: -------------------------------------------------------------------------------- 1 | /* $Id$ 2 | * 3 | * This program is free software; you can redistribute it and/or modify 4 | * it under the terms of the GNU General Public License as published by 5 | * the Free Software Foundation; either version 3 of the License, or 6 | * (at your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program; if not, write to the Free Software Foundation, Inc., 15 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | * 17 | * Copyright (C) 2013 Cedric Leporcq 18 | * 19 | * This code is derived from original 'Window Applets' from Andrej Belcijan. 20 | */ 21 | 22 | #include "wck-utils.h" 23 | 24 | /* Prototypes */ 25 | static WnckWindow *get_root_window(WnckScreen *screen); 26 | static WnckWindow *get_upper_maximized(WckUtils *); 27 | static void track_controled_window (WckUtils *); 28 | static void active_workspace_changed(WnckScreen *, WnckWorkspace *, WckUtils *); 29 | static void active_window_changed(WnckScreen *, WnckWindow *, WckUtils *); 30 | static void track_changed_max_state(WnckWindow *, WnckWindowState, WnckWindowState, WckUtils *); 31 | static void on_umaxed_window_state_changed(WnckWindow *, WnckWindowState, WnckWindowState, WckUtils *); 32 | static void on_viewports_changed(WnckScreen *, WckUtils *); 33 | static void on_window_closed(WnckScreen *, WnckWindow *, WckUtils *); 34 | static void on_window_opened(WnckScreen *, WnckWindow *, WckUtils *); 35 | 36 | 37 | gboolean wck_signal_handler_disconnect (GObject *object, gulong handler) 38 | { 39 | if (object && handler > 0) 40 | { 41 | if (g_signal_handler_is_connected(object, handler)) 42 | { 43 | g_signal_handler_disconnect(object, handler); 44 | return TRUE; 45 | } 46 | } 47 | return FALSE; 48 | } 49 | 50 | 51 | static WnckWindow *get_root_window (WnckScreen *screen) 52 | { 53 | GList *winstack = wnck_screen_get_windows_stacked(screen); 54 | // we can't access data directly because sometimes we will get NULL or not desktop window 55 | if (winstack && wnck_window_get_window_type (winstack->data) == WNCK_WINDOW_DESKTOP) 56 | return winstack->data; 57 | else 58 | return NULL; 59 | } 60 | 61 | 62 | /* Trigger when activewindow's workspaces changes */ 63 | static void umax_window_workspace_changed (WnckWindow *window, WckUtils *win) 64 | { 65 | track_controled_window (win); 66 | } 67 | 68 | 69 | /* Trigger when a specific window's state changes */ 70 | static void track_changed_max_state (WnckWindow *window, 71 | WnckWindowState changed_mask, 72 | WnckWindowState new_state, 73 | WckUtils *win) 74 | { 75 | /* track the window max state only if it isn't the control window */ 76 | if (window != win->controlwindow) 77 | { 78 | if (window 79 | && !wnck_window_is_minimized(window) 80 | && wnck_window_is_maximized(window)) 81 | { 82 | track_controled_window (win); 83 | } 84 | } 85 | } 86 | 87 | 88 | /* Triggers when umaxedwindow's state changes */ 89 | static void on_umaxed_window_state_changed (WnckWindow *window, 90 | WnckWindowState changed_mask, 91 | WnckWindowState new_state, 92 | WckUtils *win) 93 | { 94 | /* WARNING : only if window is unmaximized to prevent growing loop !!!*/ 95 | if (!wnck_window_is_maximized(window) 96 | || wnck_window_is_minimized(window) 97 | || changed_mask & (WNCK_WINDOW_STATE_ABOVE)) 98 | { 99 | track_controled_window (win); 100 | } 101 | else { 102 | on_wck_state_changed(win->controlwindow, win->data); 103 | } 104 | } 105 | 106 | 107 | /* Returns the highest maximized window */ 108 | static WnckWindow *get_upper_maximized (WckUtils *win) 109 | { 110 | WnckWindow *umaxedwindow = NULL; 111 | 112 | GList *windows = wnck_screen_get_windows_stacked(win->activescreen); 113 | 114 | while (windows && windows->data) 115 | { 116 | if (!win->activeworkspace 117 | || wnck_window_is_in_viewport(windows->data, win->activeworkspace)) 118 | if (wnck_window_is_maximized(windows->data) 119 | && !wnck_window_is_minimized(windows->data)) 120 | { 121 | umaxedwindow = windows->data; 122 | } 123 | windows = windows->next; 124 | } 125 | /* NULL if no maximized window found */ 126 | return umaxedwindow; 127 | } 128 | 129 | 130 | /* track the new controled window according to preferences */ 131 | static void track_controled_window (WckUtils *win) 132 | { 133 | WnckWindow *previous_umax = NULL; 134 | WnckWindow *previous_control = NULL; 135 | 136 | previous_control = win->controlwindow; 137 | 138 | if (win->only_maximized) 139 | { 140 | previous_umax = win->umaxwindow; 141 | win->umaxwindow = get_upper_maximized(win); 142 | win->controlwindow = win->umaxwindow; 143 | } 144 | else if (win->activewindow 145 | && (!win->activeworkspace 146 | || wnck_window_is_in_viewport(win->activewindow, win->activeworkspace)) 147 | && !wnck_window_is_minimized(win->activewindow) 148 | && !wnck_window_is_sticky(win->activewindow)) 149 | { 150 | win->controlwindow = win->activewindow; 151 | } 152 | 153 | if (!win->umaxwindow || (win->umaxwindow != previous_umax)) 154 | { 155 | wck_signal_handler_disconnect (G_OBJECT(previous_umax), win->msh); 156 | wck_signal_handler_disconnect (G_OBJECT(previous_umax), win->mwh); 157 | } 158 | 159 | if (win->only_maximized) 160 | { 161 | if (win->umaxwindow && (win->umaxwindow != previous_umax)) 162 | { 163 | /* track the new upper maximized window state */ 164 | win->msh = g_signal_connect(G_OBJECT(win->umaxwindow), 165 | "state-changed", 166 | G_CALLBACK (on_umaxed_window_state_changed), 167 | win); 168 | win->mwh = g_signal_connect(G_OBJECT (win->umaxwindow), 169 | "workspace-changed", 170 | G_CALLBACK (umax_window_workspace_changed), 171 | win); 172 | } 173 | else if (win->controlwindow == previous_control) 174 | { 175 | /* track previous upper maximized window state on desktop */ 176 | win->umaxwindow = previous_umax; 177 | if (win->umaxwindow) { 178 | win->msh = g_signal_connect(G_OBJECT(win->umaxwindow), 179 | "state-changed", 180 | G_CALLBACK (track_changed_max_state), 181 | win); 182 | } 183 | } 184 | } 185 | 186 | if (!win->controlwindow) 187 | win->controlwindow = get_root_window(win->activescreen); 188 | 189 | if (win->controlwindow != previous_control) 190 | on_control_window_changed(win->controlwindow, previous_control, win->data); 191 | else 192 | on_wck_state_changed(win->controlwindow, win->data); 193 | } 194 | 195 | 196 | /* Triggers when a new window has been opened */ 197 | static void on_window_opened (WnckScreen *screen, 198 | WnckWindow *window, 199 | WckUtils *win) 200 | { 201 | // track new maximized window 202 | if (wnck_window_is_maximized(window)) 203 | track_controled_window (win); 204 | } 205 | 206 | 207 | /* Triggers when a window has been closed */ 208 | static void on_window_closed (WnckScreen *screen, 209 | WnckWindow *window, 210 | WckUtils *win) 211 | { 212 | // track closed maximized window 213 | if (wnck_window_is_maximized(window)) 214 | track_controled_window (win); 215 | } 216 | 217 | 218 | /* Triggers when a new active window is selected */ 219 | static void active_window_changed (WnckScreen *screen, 220 | WnckWindow *previous, 221 | WckUtils *win) 222 | { 223 | 224 | win->activewindow = wnck_screen_get_active_window(screen); 225 | 226 | if (win->activewindow != previous) 227 | { 228 | wck_signal_handler_disconnect (G_OBJECT(previous), win->ash); 229 | 230 | track_controled_window (win); 231 | } 232 | 233 | if (win->activewindow 234 | && (win->activewindow != previous) 235 | && (wnck_window_get_window_type (win->activewindow) != WNCK_WINDOW_DESKTOP)) 236 | { 237 | /* Start tracking the new active window */ 238 | win->ash = g_signal_connect(G_OBJECT (win->activewindow), "state-changed", G_CALLBACK (track_changed_max_state), win); 239 | } 240 | } 241 | 242 | 243 | /* Triggers when user changes viewports on Compiz */ 244 | // We ONLY need this for Compiz (Marco doesn't use viewports) 245 | static void on_viewports_changed (WnckScreen *screen, WckUtils *win) 246 | { 247 | reload_wnck (win, win->only_maximized, win->data); 248 | } 249 | 250 | 251 | /* Triggers when user changes workspace on Marco (?) */ 252 | static void active_workspace_changed (WnckScreen *screen, 253 | WnckWorkspace *previous, 254 | WckUtils *win) 255 | { 256 | reload_wnck (win, win->only_maximized, win->data); 257 | } 258 | 259 | 260 | void toggle_maximize (WnckWindow *window) 261 | { 262 | if (window && wnck_window_is_maximized(window)) 263 | wnck_window_unmaximize(window); 264 | else 265 | wnck_window_maximize(window); 266 | } 267 | 268 | 269 | void reload_wnck (WckUtils *win, gboolean only_maximized, gpointer data) 270 | { 271 | /* disconnect all signal handlers */ 272 | wck_signal_handler_disconnect (G_OBJECT(win->controlwindow), win->ash); 273 | wck_signal_handler_disconnect (G_OBJECT(win->controlwindow), win->msh); 274 | wck_signal_handler_disconnect (G_OBJECT(win->controlwindow), win->mwh); 275 | 276 | wck_signal_handler_disconnect (G_OBJECT(win->activescreen), win->sch); 277 | wck_signal_handler_disconnect (G_OBJECT(win->activescreen), win->soh); 278 | wck_signal_handler_disconnect (G_OBJECT(win->activescreen), win->svh); 279 | wck_signal_handler_disconnect (G_OBJECT(win->activescreen), win->swh); 280 | 281 | init_wnck (win, only_maximized, data); 282 | } 283 | 284 | 285 | void init_wnck (WckUtils *win, gboolean only_maximized, gpointer data) 286 | { 287 | /* save data */ 288 | win->data = data; 289 | 290 | /* get window proprieties */ 291 | win->activescreen = wnck_screen_get_default(); 292 | win->activeworkspace = wnck_screen_get_active_workspace(win->activescreen); 293 | if (!win->activeworkspace) 294 | win->activeworkspace = wnck_screen_get_workspace(win->activescreen, 0); 295 | win->activewindow = wnck_screen_get_active_window(win->activescreen); 296 | win->umaxwindow = NULL; 297 | win->controlwindow = NULL; 298 | win->only_maximized = only_maximized; 299 | 300 | /* Global window tracking */ 301 | g_signal_connect(win->activescreen, "active-window-changed", G_CALLBACK (active_window_changed), win); 302 | 303 | if (win->only_maximized) 304 | { 305 | win->sch = g_signal_connect(win->activescreen, "window-closed", G_CALLBACK (on_window_closed), win); 306 | win->soh = g_signal_connect(win->activescreen, "window-opened", G_CALLBACK (on_window_opened), win); 307 | } 308 | 309 | win->svh = g_signal_connect(win->activescreen, "viewports-changed", G_CALLBACK (on_viewports_changed), win); 310 | win->swh = g_signal_connect(win->activescreen, "active-workspace-changed", G_CALLBACK (active_workspace_changed), win); 311 | 312 | /* Get controled window */ 313 | track_controled_window (win); 314 | 315 | if (!win->controlwindow) 316 | on_control_window_changed (NULL, NULL, win->data); 317 | } 318 | -------------------------------------------------------------------------------- /common/wck-utils.h: -------------------------------------------------------------------------------- 1 | /* $Id$ 2 | * 3 | * This program is free software; you can redistribute it and/or modify 4 | * it under the terms of the GNU General Public License as published by 5 | * the Free Software Foundation; either version 3 of the License, or 6 | * (at your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program; if not, write to the Free Software Foundation, Inc., 15 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | * 17 | * Copyright (C) 2013 Cedric Leporcq 18 | * 19 | * This code is derived from original 'Window Applets' from Andrej Belcijan. 20 | */ 21 | 22 | #ifndef WCK_UTILS_H_ 23 | #define WCK_UTILS_H_ 24 | 25 | #ifndef WNCK_I_KNOW_THIS_IS_UNSTABLE 26 | #define WNCK_I_KNOW_THIS_IS_UNSTABLE 27 | #endif 28 | #include 29 | #include 30 | 31 | G_BEGIN_DECLS 32 | 33 | /* Wnck structure */ 34 | typedef struct { 35 | WnckScreen *activescreen; // Active screen 36 | WnckWorkspace *activeworkspace; // Active workspace 37 | WnckWindow *controlwindow; // Controled window according to only_maximized option 38 | WnckWindow *activewindow; // Active window 39 | WnckWindow *umaxwindow; // Upper maximized window 40 | 41 | gulong msh; // upper maximized window state handler id 42 | gulong ash; // active state handler id 43 | gulong mwh; // upper maximized workspace handler id 44 | gulong sch; // window closed handler id 45 | gulong soh; // window opened handler id 46 | gulong svh; // viewport changed handler id 47 | gulong swh; // workspace changed handler id 48 | 49 | gboolean only_maximized; // [T/F] Only track maximized windows 50 | 51 | gpointer data; 52 | } WckUtils; 53 | 54 | void init_wnck (WckUtils *win, gboolean only_maximized, gpointer data); 55 | void on_wck_state_changed (WnckWindow *controlwindow, gpointer data); 56 | void on_control_window_changed(WnckWindow *controlwindow, WnckWindow *previous, gpointer data); 57 | void reload_wnck (WckUtils *win, gboolean only_maximized, gpointer data); 58 | void toggle_maximize (WnckWindow *window); 59 | gboolean wck_signal_handler_disconnect (GObject *object, gulong handler); 60 | 61 | G_END_DECLS 62 | 63 | #endif /* WCK_UTILS_H_ */ 64 | -------------------------------------------------------------------------------- /configure.ac.in: -------------------------------------------------------------------------------- 1 | dnl $Id$ 2 | dnl 3 | dnl xfce4-windowck-plugin - Put the maximized window title in the panel. 4 | dnl 5 | 6 | dnl *************************** 7 | dnl *** Version information *** 8 | dnl *************************** 9 | m4_define([windowck_version_major], [0]) 10 | m4_define([windowck_version_minor], [4]) 11 | m4_define([windowck_version_micro], [6]) 12 | m4_define([windowck_version_nano], []) dnl leave this empty to have no nano version 13 | m4_define([windowck_version_build], [@REVISION@]) 14 | m4_define([windowck_version_tag], []) 15 | m4_define([windowck_version], [windowck_version_major().windowck_version_minor().windowck_version_micro()ifelse(windowck_version_nano(), [], [], [.windowck_version_nano()])ifelse(windowck_version_tag(), [git], [windowck_version_tag()-windowck_version_build()], [windowck_version_tag()])]) 16 | 17 | dnl *************************** 18 | dnl *** Initialize autoconf *** 19 | dnl *************************** 20 | AC_COPYRIGHT([Copyright (C) 2015 21 | Alessio Piccoli, Cedric Leporcq. All rights reserved.]) 22 | AC_INIT([xfce4-windowck-plugin], [windowck_version], [https://github.com/cedl38/xfce4-windowck-plugin/], [xfce4-windowck-plugin]) 23 | AC_PREREQ([2.50]) 24 | AC_REVISION([xfce4_panel_version_build]) 25 | 26 | dnl *************************** 27 | dnl *** Initialize automake *** 28 | dnl *************************** 29 | AM_INIT_AUTOMAKE([1.8 no-dist-gzip dist-bzip2 tar-ustar]) 30 | AM_CONFIG_HEADER([config.h]) 31 | AM_MAINTAINER_MODE() 32 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 33 | 34 | dnl ******************************* 35 | dnl *** Check for UNIX variants *** 36 | dnl ******************************* 37 | AC_AIX() 38 | AC_ISC_POSIX() 39 | 40 | dnl ******************************** 41 | dnl *** Check for basic programs *** 42 | dnl ******************************** 43 | AC_PROG_CC() 44 | AM_PROG_CC_C_O() 45 | AC_PROG_LD() 46 | AC_PROG_INSTALL() 47 | AC_PROG_INTLTOOL() 48 | 49 | dnl ************************** 50 | dnl *** Initialize libtool *** 51 | dnl ************************** 52 | LT_PREREQ([2.2.6]) 53 | LT_INIT([disable-static]) 54 | 55 | dnl ********************************** 56 | dnl *** Check for standard headers *** 57 | dnl ********************************** 58 | AC_HEADER_STDC() 59 | AC_CHECK_HEADERS([stdlib.h unistd.h locale.h stdio.h errno.h time.h string.h \ 60 | math.h sys/types.h sys/wait.h memory.h signal.h sys/prctl.h \ 61 | libintl.h]) 62 | AC_CHECK_FUNCS([bind_textdomain_codeset]) 63 | 64 | dnl ****************************** 65 | dnl *** Check for i18n support *** 66 | dnl ****************************** 67 | XDT_I18N([@LINGUAS@]) 68 | 69 | dnl ******************************* 70 | dnl *** Check for X11 installed *** 71 | dnl ******************************* 72 | XDT_CHECK_LIBX11_REQUIRE() 73 | 74 | dnl *********************************** 75 | dnl *** Check for required packages *** 76 | dnl *********************************** 77 | XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.20.0]) 78 | XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.10.0]) 79 | XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.10.0]) 80 | XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.12.0]) 81 | XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.10.0]) 82 | XDT_CHECK_PACKAGE([LIBWNCK], [libwnck-1.0], [2.30]) 83 | 84 | dnl *********************************** 85 | dnl *** Check for debugging support *** 86 | dnl *********************************** 87 | XDT_FEATURE_DEBUG() 88 | 89 | dnl ********************************* 90 | dnl *** Substitute platform flags *** 91 | dnl ********************************* 92 | AC_MSG_CHECKING([PLATFORM_CPPFLAGS]) 93 | AC_MSG_RESULT([$PLATFORM_CPPFLAGS]) 94 | AC_SUBST([PLATFORM_CPPFLAGS]) 95 | AC_MSG_CHECKING([PLATFORM_CFLAGS]) 96 | AC_MSG_RESULT([$PLATFORM_CFLAGS]) 97 | AC_SUBST([PLATFORM_CFLAGS]) 98 | AC_MSG_CHECKING([PLATFORM_LDFLAGS]) 99 | AC_MSG_RESULT([$PLATFORM_LDFLAGS]) 100 | AC_SUBST([PLATFORM_LDFLAGS]) 101 | 102 | AC_OUTPUT([ 103 | Makefile 104 | icons/Makefile 105 | icons/48x48/Makefile 106 | common/Makefile 107 | panel-plugin/Makefile 108 | panel-plugin/title/Makefile 109 | panel-plugin/buttons/Makefile 110 | themes/Makefile 111 | themes/windowck/Makefile 112 | themes/windowck/xfwm4/Makefile 113 | themes/windowck/unity/Makefile 114 | themes/windowck-dark/Makefile 115 | themes/windowck-dark/xfwm4/Makefile 116 | themes/windowck-dark/unity/Makefile 117 | po/Makefile.in 118 | ]) 119 | 120 | dnl *************************** 121 | dnl *** Print configuration *** 122 | dnl *************************** 123 | echo 124 | echo "Build Configuration:" 125 | echo 126 | echo "* Debug Support: $enable_debug" 127 | echo 128 | -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | xfce4-windowck-plugin (0.4.5) UNRELEASED; urgency=low 2 | 3 | 0.4.5 4 | Fix #28 - Updated deb packages dependency for ubuntu 15.10+ 5 | 6 | -- Cedric Leporcq Sun, 1 May 2016 14:40:00 +0200 7 | 8 | xfce4-windowck-plugin (0.4.4) UNRELEASED; urgency=low 9 | 10 | 0.4.4 11 | Fix #22 support of *.svg based unity themes 12 | 0.4.3 13 | Fix #21 disable activate mouse action on desktop 14 | properly hide title on desktop #21 15 | 0.4.2 16 | ReAdd missing themerc from windowck themes 17 | 0.4.1 18 | Add missing dependency in PKGBUILD 19 | Update debian packaging 20 | Remove *.xpm files from source code 21 | 22 | -- Cedric Leporcq Mon, 15 Jun 2015 21:40:15 +0200 23 | 24 | xfce4-windowck-plugin (0.4.0) UNRELEASED; urgency=low 25 | 26 | * change details 27 | Fix Icon on right behaviour reg. #da3b6c6 28 | Drop xpm support 29 | Improve windowck themes 30 | Added Czech translation 100% 31 | fix #16 Remove background on buttons 32 | fix #14 correctly update title when switching workspace 33 | fix #5 Let windowck plugin skip whiskermenu 34 | 35 | -- Cedric Leporcq Sun, 17 May 2015 14:30:15 +0200 36 | 37 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: xfce4-windowck-plugin 2 | Section: xfce 3 | Priority: optional 4 | Maintainer: Cedric Leporcq 5 | Build-Depends: debhelper (>= 9), ui-auto, pkg-config, intltool, 6 | libgtk2.0-0 (>= 2.20.0), libxfce4util7 (>= 4.10), libxfconf-0-2 (>= 4.10), 7 | libxfce4ui-1-dev (>= 4.10), libwnck-dev (>= 2.30), 8 | xfce4-dev-tools, libglib2.0-dev, libgtk2.0-dev, libx11-dev, libxfce4ui-1-0, 9 | xfce4-panel-dev, imagemagick, python3 10 | Standards-Version: 3.9.3 11 | Homepage: http://goodies.xfce.org/projects/panel-plugins/xfce4-windowck-plugin 12 | Vcs-Git: git://github.com/geckoblu/xfce4-windowck-plugin.git 13 | 14 | Package: xfce4-windowck-plugin 15 | Architecture: any 16 | Multi-Arch: same 17 | Depends: ${shlibs:Depends}, ${misc:Depends}, xfce4-panel (>= 4.12), libwnck22 18 | Description: Xfce panel plugin which allows to put the maximized window title on the panel. 19 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | Format: http://dep.debian.net/deps/dep5 2 | Upstream-Name: xfce4-windowck-plugin 3 | Source: http://goodies.xfce.org/projects/panel-plugins/xfce4-windowck-plugin 4 | 5 | Files: * 6 | Copyright: 2015 Cédric Leporcq 7 | License: GPL-3.0+ 8 | 9 | Files: debian/* 10 | Copyright: 2015 Cédric Leporcq 11 | License: GPL-3.0+ 12 | 13 | License: GPL-3.0+ 14 | This program is free software: you can redistribute it and/or modify 15 | it under the terms of the GNU General Public License as published by 16 | the Free Software Foundation, either version 3 of the License, or 17 | (at your option) any later version. 18 | . 19 | This package is distributed in the hope that it will be useful, 20 | but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | GNU General Public License for more details. 23 | . 24 | You should have received a copy of the GNU General Public License 25 | along with this program. If not, see . 26 | . 27 | On Debian systems, the complete text of the GNU General 28 | Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". 29 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -*- makefile -*- 3 | # Sample debian/rules that uses debhelper. 4 | # This file was originally written by Joey Hess and Craig Small. 5 | # As a special exception, when this file is copied by dh-make into a 6 | # dh-make output file, you may use that output file without restriction. 7 | # This special exception was added by Craig Small in version 0.37 of dh-make. 8 | 9 | # Uncomment this to turn on verbose mode. 10 | #export DH_VERBOSE=1 11 | 12 | %: 13 | dh $@ 14 | 15 | override_dh_auto_configure: 16 | ./configure --prefix=/usr --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) 17 | 18 | override_dh_auto_install: 19 | dh_auto_install 20 | find . -name "*.la" -exec rm {} \; 21 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /icons/48x48/Makefile.am: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | 3 | iconsdir = $(datadir)/icons/hicolor/48x48/apps 4 | icons_DATA = \ 5 | windowck-plugin.png \ 6 | wckbuttons-plugin.png 7 | 8 | EXTRA_DIST = \ 9 | $(icons_DATA) 10 | 11 | # vi:set ts=8 sw=8 noet ai nocindent syntax=automake: 12 | -------------------------------------------------------------------------------- /icons/48x48/wckbuttons-plugin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/takinoy/xfce4-windowck-plugin/3f1c8607d5ea71013bff32f54ce705b0d2b14ea4/icons/48x48/wckbuttons-plugin.png -------------------------------------------------------------------------------- /icons/48x48/windowck-plugin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/takinoy/xfce4-windowck-plugin/3f1c8607d5ea71013bff32f54ce705b0d2b14ea4/icons/48x48/windowck-plugin.png -------------------------------------------------------------------------------- /icons/Makefile.am: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | 3 | SUBDIRS = \ 4 | 48x48 5 | 6 | gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor 7 | 8 | update-icon-cache: 9 | @-if test -z "$(DESTDIR)"; then \ 10 | echo "Updating Gtk icon cache."; \ 11 | $(gtk_update_icon_cache); \ 12 | else \ 13 | echo "*** Icon cache not updated. Remember to run:"; \ 14 | echo "***"; \ 15 | echo "*** $(gtk_update_icon_cache)"; \ 16 | echo "***"; \ 17 | fi 18 | 19 | install-data-hook: update-icon-cache 20 | 21 | uninstall-hook: update-icon-cache 22 | 23 | # vi:set ts=8 sw=8 noet ai nocindent syntax=automake: 24 | -------------------------------------------------------------------------------- /panel-plugin/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | SUBDIRS = title buttons 3 | -------------------------------------------------------------------------------- /panel-plugin/buttons/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = \ 2 | -I$(top_srcdir) \ 3 | -DG_LOG_DOMAIN=\"xfce4-wckbuttons-plugin\" \ 4 | -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \ 5 | $(PLATFORM_CPPFLAGS) 6 | 7 | # 8 | # Windowck Buttons plugin 9 | # 10 | plugin_LTLIBRARIES = \ 11 | libwckbuttons.la 12 | 13 | plugindir = \ 14 | $(libdir)/xfce4/panel/plugins 15 | 16 | libwindowck_built_sources = \ 17 | wckbuttons-dialogs_ui.h 18 | 19 | libwckbuttons_la_SOURCES = \ 20 | $(libwckbuttons_built_sources) \ 21 | wckbuttons.c \ 22 | wckbuttons.h \ 23 | wckbuttons-theme.c \ 24 | wckbuttons-theme.h \ 25 | wckbuttons-dialogs.c \ 26 | wckbuttons-dialogs.h 27 | 28 | libwckbuttons_la_CFLAGS = \ 29 | $(GTK_CFLAGS) \ 30 | $(LIBXFCE4UTIL_CFLAGS) \ 31 | $(LIBXFCE4UI_CFLAGS) \ 32 | $(LIBXFCE4PANEL_CFLAGS) \ 33 | $(LIBWNCK_CFLAGS) \ 34 | $(XFCONF_CFLAGS) \ 35 | $(PLATFORM_CFLAGS) \ 36 | -DDATADIR=\"$(datadir)\" 37 | 38 | libwckbuttons_la_LDFLAGS = \ 39 | -avoid-version \ 40 | -module \ 41 | -no-undefined \ 42 | -export-symbols-regex '^xfce_panel_module_(preinit|init|construct)' \ 43 | $(PLATFORM_LDFLAGS) 44 | 45 | libwckbuttons_la_LIBADD = \ 46 | $(top_builddir)/common/libwck-common.la \ 47 | $(GTK_LIBS) \ 48 | $(LIBXFCE4UTIL_LIBS) \ 49 | $(LIBXFCE4UI_LIBS) \ 50 | $(LIBWNCK_LIBS) \ 51 | $(LIBXFCE4PANEL_LIBS) \ 52 | $(XFCONF_LIBS) 53 | 54 | libwckbuttons_la_DEPENDENCIES = \ 55 | $(top_builddir)/common/libwck-common.la 56 | 57 | # 58 | # Desktop file 59 | # 60 | desktopdir = \ 61 | $(datadir)/xfce4/panel/plugins 62 | 63 | desktop_DATA = \ 64 | wckbuttons.desktop 65 | 66 | @INTLTOOL_DESKTOP_RULE@ 67 | 68 | EXTRA_DIST = \ 69 | wckbuttons-dialogs.glade \ 70 | wckbuttons.desktop.in 71 | 72 | CLEANFILES = \ 73 | $(desktop_DATA) 74 | 75 | BUILT_SOURCES = \ 76 | $(libwindowck_built_sources) 77 | 78 | CLEANFILES += \ 79 | $(libwindowck_built_sources) 80 | 81 | wckbuttons-dialogs_ui.h: wckbuttons-dialogs.glade 82 | $(AM_V_GEN) exo-csource --static --strip-comments --strip-content --name=wckbuttons_dialogs_ui $< >$@ 83 | 84 | # vi:set ts=8 sw=8 noet ai nocindent syntax=automake: 85 | -------------------------------------------------------------------------------- /panel-plugin/buttons/wckbuttons-dialogs.glade: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | True 7 | False 8 | 8 9 | 14 10 | 14 11 | 14 12 | 13 | 14 | True 15 | False 16 | 10 17 | 18 | 19 | True 20 | False 21 | 0 22 | none 23 | 24 | 25 | True 26 | False 27 | 5 28 | 3 29 | 12 30 | 10 31 | 32 | 33 | True 34 | False 35 | 1 36 | 37 | 38 | Control maximized windows. 39 | True 40 | True 41 | False 42 | True 43 | 44 | 45 | True 46 | True 47 | 0 48 | 49 | 50 | 51 | 52 | Control active windows. 53 | True 54 | True 55 | False 56 | True 57 | only_maximized 58 | 59 | 60 | True 61 | True 62 | 1 63 | 64 | 65 | 66 | 67 | Show the buttons on desktop. 68 | True 69 | True 70 | False 71 | Logout on close button desktop. 72 | 0.47999998927116394 73 | True 74 | 75 | 76 | False 77 | True 78 | 2 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | True 88 | False 89 | <b>Behaviour</b> 90 | True 91 | 92 | 93 | 94 | 95 | True 96 | True 97 | 0 98 | 99 | 100 | 101 | 102 | True 103 | False 104 | 0 105 | none 106 | 107 | 108 | True 109 | False 110 | 5 111 | 3 112 | 12 113 | 10 114 | 115 | 116 | True 117 | False 118 | 6 119 | 120 | 121 | Get in sync with the window manager theme. 122 | True 123 | True 124 | False 125 | True 126 | 127 | 128 | True 129 | True 130 | 0 131 | 132 | 133 | 134 | 135 | 200 136 | True 137 | True 138 | automatic 139 | automatic 140 | in 141 | 142 | 143 | 200 144 | True 145 | True 146 | 147 | 148 | 149 | 150 | True 151 | True 152 | 1 153 | 154 | 155 | 156 | 157 | True 158 | False 159 | 6 160 | 161 | 162 | True 163 | False 164 | 0 165 | Button layout: 166 | 167 | 168 | False 169 | True 170 | 0 171 | 172 | 173 | 174 | 175 | True 176 | True 177 | Put the buttons id in the desired order. 178 | Example: [HMC] 179 | H=Hide, M=Maximize/unMaximize, C=Close 180 | 3 181 | 182 | True 183 | 4 184 | True 185 | False 186 | False 187 | True 188 | True 189 | 190 | 191 | False 192 | False 193 | 1 194 | 195 | 196 | 197 | 198 | True 199 | True 200 | 2 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | True 210 | False 211 | <b>Appearance</b> 212 | True 213 | 214 | 215 | 216 | 217 | True 218 | True 219 | 1 220 | 221 | 222 | 223 | 224 | 225 | 226 | -------------------------------------------------------------------------------- /panel-plugin/buttons/wckbuttons-dialogs.h: -------------------------------------------------------------------------------- 1 | /* $Id$ 2 | * 3 | * This program is free software; you can redistribute it and/or modify 4 | * it under the terms of the GNU General Public License as published by 5 | * the Free Software Foundation; either version 3 of the License, or 6 | * (at your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program; if not, write to the Free Software Foundation, Inc., 15 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | * 17 | * Copyright (C) 2013 Cedric Leporcq 18 | * 19 | */ 20 | 21 | #ifndef __WCKBUTTONS_DIALOGS_H__ 22 | #define __WCKBUTTONS_DIALOGS_H__ 23 | 24 | G_BEGIN_DECLS 25 | 26 | void 27 | wckbuttons_configure (XfcePanelPlugin *plugin, WBPlugin *wb); 28 | 29 | G_END_DECLS 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /panel-plugin/buttons/wckbuttons-theme.c: -------------------------------------------------------------------------------- 1 | /* $Id$ 2 | * 3 | * This program is free software; you can redistribute it and/or modify 4 | * it under the terms of the GNU General Public License as published by 5 | * the Free Software Foundation; either version 3 of the License, or 6 | * (at your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program; if not, write to the Free Software Foundation, Inc., 15 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | * 17 | * Copyright (C) 2013 Cedric Leporcq 18 | * 19 | * Parts of this code is derived from xfwm4 sources (setting.c) 20 | * 21 | */ 22 | 23 | #include 24 | #include 25 | 26 | #include "wckbuttons-theme.h" 27 | 28 | #define XPM_COLOR_SYMBOL_SIZE 22 29 | 30 | 31 | static void get_unity_pixbuf (const gchar *themedir, WBPlugin *wb) { 32 | gint i,j; 33 | gchar imagename[40]; 34 | 35 | static const char *button_names[] = { 36 | "minimize", 37 | "unmaximize", 38 | "maximize", 39 | "close" 40 | }; 41 | 42 | static const char *button_state_names[] = { 43 | "unfocused", 44 | "focused_normal", 45 | "focused_prelight", 46 | "focused_pressed" 47 | }; 48 | 49 | for (i = 0; i < IMAGES_BUTTONS; i++) 50 | { 51 | for (j = 0; j < IMAGES_STATES; j++) 52 | { 53 | g_snprintf(imagename, sizeof (imagename), "%s_%s", button_names[i], button_state_names[j]); 54 | wb->pixbufs[i][j] = pixbuf_alpha_load (themedir, imagename); 55 | } 56 | } 57 | } 58 | 59 | 60 | gchar *button_layout_filter (const gchar *string, const gchar *default_layout) 61 | { 62 | guint i, j; 63 | gchar layout[BUTTONS] = {0}; 64 | 65 | /* WARNING : beware of bluffer overflow !!! */ 66 | j = 0; 67 | for (i = 0; i < strlen (string) && j < BUTTONS; i++) 68 | { 69 | switch (string[i]) 70 | { 71 | case 'H': 72 | layout[j++] = 'H'; 73 | break; 74 | case 'M': 75 | layout[j++] = 'M'; 76 | break; 77 | case 'C': 78 | layout[j++] = 'C'; 79 | } 80 | } 81 | 82 | layout[j] = '\0'; 83 | 84 | if (layout[0] == '\0') 85 | return g_strdup (default_layout); 86 | 87 | return g_strdup (layout); 88 | } 89 | 90 | 91 | gchar *opposite_layout_filter (const gchar *string) 92 | { 93 | guint i, j; 94 | gchar layout[8] = {0}; 95 | 96 | /* WARNING : beware of bluffer overflow !!! */ 97 | j = 0; 98 | for (i = 0; i < strlen (string) && j < 8; i++) 99 | { 100 | switch (string[i]) 101 | { 102 | case 'H': 103 | case 'M': 104 | case 'C': 105 | break; 106 | default: 107 | layout[j] = string[i]; 108 | j++; 109 | } 110 | } 111 | 112 | layout[j] = '\0'; 113 | 114 | return g_strdup (layout); 115 | } 116 | 117 | 118 | static int get_button_from_letter (char chr) 119 | { 120 | 121 | TRACE ("entering get_button_from_letter"); 122 | 123 | switch (chr) 124 | { 125 | case 'H': 126 | return MINIMIZE_BUTTON; 127 | case 'M': 128 | return MAXIMIZE_BUTTON; 129 | case 'C': 130 | return CLOSE_BUTTON; 131 | default: 132 | return -1; 133 | } 134 | } 135 | 136 | 137 | /* Replace buttons accordingly to button_layout and visible state */ 138 | void replace_buttons (const gchar *button_layout, WBPlugin *wb) 139 | { 140 | guint i, j; 141 | gint button; 142 | 143 | for (i = 0; i < BUTTONS; i++) 144 | gtk_widget_hide_all(GTK_WIDGET(wb->button[i]->eventbox)); 145 | 146 | j = 0; 147 | for (i = 0; i < strlen (button_layout); i++) 148 | { 149 | button = get_button_from_letter (button_layout[i]); 150 | if (button >= 0 && wb->button[button]->image) 151 | { 152 | gtk_box_reorder_child (GTK_BOX (wb->hvbox), GTK_WIDGET(wb->button[button]->eventbox), j); 153 | 154 | gtk_widget_show_all(GTK_WIDGET(wb->button[button]->eventbox)); 155 | j++; 156 | } 157 | } 158 | } 159 | 160 | 161 | gchar *get_rc_button_layout (const gchar *theme) 162 | { 163 | gchar *wm_themedir; 164 | 165 | wm_themedir = test_theme_dir(theme, "xfwm4", THEMERC); 166 | 167 | if (G_LIKELY(wm_themedir)) 168 | { 169 | const gchar *rc_button_layout; 170 | gchar *filename; 171 | XfceRc *rc; 172 | 173 | /* check in the rc if the theme supports a custom button layout */ 174 | filename = g_build_filename (wm_themedir, THEMERC, NULL); 175 | 176 | rc = xfce_rc_simple_open (filename, TRUE); 177 | g_free (filename); 178 | 179 | if (G_LIKELY (rc)) 180 | { 181 | rc_button_layout = xfce_rc_read_entry (rc, "button_layout", NULL); 182 | 183 | if (rc_button_layout) 184 | return button_layout_filter (rc_button_layout, NULL); 185 | } 186 | } 187 | g_free (wm_themedir); 188 | 189 | return NULL; 190 | } 191 | 192 | 193 | /* load the theme according to xfwm4 theme format */ 194 | void load_theme (const gchar *theme, WBPlugin *wb) 195 | { 196 | gint i; 197 | gchar *themedir; 198 | 199 | /* get theme dir */ 200 | themedir = get_unity_theme_dir (wb->prefs->theme, DEFAULT_THEME); 201 | 202 | if (themedir) 203 | { 204 | get_unity_pixbuf (themedir, wb); 205 | g_free (themedir); 206 | 207 | /* try to replace missing images */ 208 | 209 | for (i = 0; i < IMAGES_STATES; i++) 210 | { 211 | if (!wb->pixbufs[IMAGE_UNMAXIMIZE][i]) 212 | wb->pixbufs[IMAGE_UNMAXIMIZE][i] = wb->pixbufs[IMAGE_MAXIMIZE][i]; 213 | } 214 | for (i = 0; i < IMAGES_BUTTONS; i++) 215 | { 216 | if (!wb->pixbufs[i][IMAGE_UNFOCUSED] || !wb->pixbufs[i][IMAGE_PRESSED]) 217 | wb->pixbufs[i][IMAGE_UNFOCUSED] = wb->pixbufs[i][IMAGE_FOCUSED]; 218 | 219 | if (!wb->pixbufs[i][IMAGE_PRELIGHT]) 220 | wb->pixbufs[i][IMAGE_PRELIGHT] = wb->pixbufs[i][IMAGE_PRESSED]; 221 | } 222 | } 223 | } 224 | 225 | 226 | static void apply_wm_theme (WBPlugin *wb) 227 | { 228 | const gchar *wm_theme = xfconf_channel_get_string (wb->wm_channel, "/general/theme", NULL); 229 | 230 | if (G_LIKELY(wm_theme)) 231 | { 232 | gchar *button_layout; 233 | 234 | wb->prefs->theme = g_strdup (wm_theme); 235 | load_theme (wb->prefs->theme, wb); 236 | 237 | button_layout = get_rc_button_layout (wm_theme); 238 | 239 | if (button_layout) 240 | { 241 | replace_buttons (button_layout, wb); 242 | } 243 | else 244 | { 245 | const gchar *wm_buttons_layout = xfconf_channel_get_string (wb->wm_channel, "/general/button_layout", wb->prefs->button_layout); 246 | wb->prefs->button_layout = button_layout_filter (wm_buttons_layout, wb->prefs->button_layout); 247 | 248 | replace_buttons (wb->prefs->button_layout, wb); 249 | } 250 | g_free (button_layout); 251 | } 252 | 253 | on_wck_state_changed (wb->win->controlwindow, wb); 254 | } 255 | 256 | 257 | static void 258 | on_x_chanel_property_changed (XfconfChannel *x_channel, const gchar *property_name, const GValue *value, WBPlugin *wb) 259 | { 260 | if (g_str_has_prefix(property_name, "/Net/") == TRUE) 261 | { 262 | const gchar *name = &property_name[5]; 263 | switch (G_VALUE_TYPE(value)) 264 | { 265 | case G_TYPE_STRING: 266 | if (!strcmp (name, "ThemeName")) 267 | { 268 | apply_wm_theme (wb); 269 | } 270 | break; 271 | default: 272 | g_warning("The property '%s' is not supported", property_name); 273 | break; 274 | } 275 | } 276 | } 277 | 278 | 279 | static void 280 | on_xfwm_channel_property_changed (XfconfChannel *wm_channel, const gchar *property_name, const GValue *value, WBPlugin *wb) 281 | { 282 | if (g_str_has_prefix(property_name, "/general/") == TRUE) 283 | { 284 | const gchar *name = &property_name[9]; 285 | switch (G_VALUE_TYPE(value)) 286 | { 287 | case G_TYPE_STRING: 288 | if (!strcmp (name, "theme") 289 | || !strcmp (name, "button_layout")) 290 | { 291 | apply_wm_theme (wb); 292 | } 293 | break; 294 | default: 295 | g_warning("The property '%s' is not supported", property_name); 296 | break; 297 | } 298 | } 299 | } 300 | 301 | 302 | void init_theme (WBPlugin *wb) 303 | { 304 | /* get the xfwm4 chanel */ 305 | wb->wm_channel = wck_properties_get_channel (G_OBJECT (wb->plugin), "xfwm4"); 306 | 307 | /* try to use the xfwm4 theme */ 308 | if (wb->wm_channel && wb->prefs->sync_wm_theme) 309 | { 310 | apply_wm_theme (wb); 311 | 312 | g_signal_connect (wb->wm_channel, "property-changed", G_CALLBACK (on_xfwm_channel_property_changed), wb); 313 | } 314 | else 315 | { 316 | load_theme (wb->prefs->theme, wb); 317 | replace_buttons (wb->prefs->button_layout, wb); 318 | } 319 | 320 | /* get the xsettings chanel to update the gtk theme */ 321 | wb->x_channel = wck_properties_get_channel (G_OBJECT (wb->plugin), "xsettings"); 322 | 323 | if (wb->x_channel) 324 | g_signal_connect (wb->x_channel, "property-changed", G_CALLBACK (on_x_chanel_property_changed), wb); 325 | } 326 | -------------------------------------------------------------------------------- /panel-plugin/buttons/wckbuttons-theme.h: -------------------------------------------------------------------------------- 1 | /* $Id$ 2 | * 3 | * This program is free software; you can redistribute it and/or modify 4 | * it under the terms of the GNU General Public License as published by 5 | * the Free Software Foundation; either version 3 of the License, or 6 | * (at your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program; if not, write to the Free Software Foundation, Inc., 15 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | * 17 | * Copyright (C) 2013 Cedric Leporcq 18 | * 19 | * This stuff is mostly derived from xfwm4 sources (setting.c) 20 | * 21 | */ 22 | 23 | #ifndef __WCKBUTTONS_THEME_H__ 24 | #define __WCKBUTTONS_THEME_H__ 25 | 26 | #include 27 | #include "wckbuttons.h" 28 | 29 | /* default settings */ 30 | #define DEFAULT_THEME "Windowck" 31 | 32 | G_BEGIN_DECLS 33 | 34 | typedef struct { 35 | gchar *option; 36 | GValue *value; 37 | GType type; 38 | gboolean required; 39 | } Settings; 40 | 41 | 42 | void init_theme (WBPlugin *wb); 43 | void load_theme (const gchar *theme, WBPlugin *wb); 44 | void replace_buttons (const gchar *button_layout, WBPlugin *wb); 45 | gchar *get_rc_button_layout (const gchar *theme); 46 | gchar *button_layout_filter (const gchar *button_layout, const gchar *default_layout); 47 | gchar *opposite_layout_filter (const gchar *string); 48 | 49 | G_END_DECLS 50 | 51 | #endif /* !__WCKBUTTONS_THEME_H__ */ 52 | -------------------------------------------------------------------------------- /panel-plugin/buttons/wckbuttons.desktop.in: -------------------------------------------------------------------------------- 1 | [Xfce Panel] 2 | Type=X-XFCE-PanelPlugin 3 | Encoding=UTF-8 4 | _Name=Window Header - Buttons 5 | _Comment=Put the maximized window buttons on the panel. 6 | Icon=wckbuttons-plugin 7 | X-XFCE-Module=wckbuttons 8 | X-XFCE-Internal=false 9 | X-XFCE-Unique=false 10 | -------------------------------------------------------------------------------- /panel-plugin/buttons/wckbuttons.h: -------------------------------------------------------------------------------- 1 | /* $Id$ 2 | * 3 | * This program is free software; you can redistribute it and/or modify 4 | * it under the terms of the GNU General Public License as published by 5 | * the Free Software Foundation; either version 3 of the License, or 6 | * (at your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program; if not, write to the Free Software Foundation, Inc., 15 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | * 17 | * Copyright (C) 2013 Cedric Leporcq 18 | * 19 | */ 20 | 21 | #ifndef __WCKBUTTONS_H__ 22 | #define __WCKBUTTONS_H__ 23 | 24 | #include 25 | #include 26 | 27 | G_BEGIN_DECLS 28 | 29 | /* indexing of buttons */ 30 | typedef enum { 31 | MINIMIZE_BUTTON = 0, // minimize button 32 | MAXIMIZE_BUTTON, // maximize/unmaximize button 33 | CLOSE_BUTTON, // close button 34 | 35 | BUTTONS // number of buttons 36 | } WindowButtonIndices; 37 | 38 | typedef enum { 39 | BUTTON_STATE_NORMAL = 0, 40 | BUTTON_STATE_PRELIGHT, 41 | BUTTON_STATE_PRESSED, 42 | 43 | BUTTON_STATES 44 | } WBButtonSt; 45 | 46 | /* we will index images for convenience */ 47 | typedef enum { 48 | IMAGE_MINIMIZE = 0, 49 | IMAGE_UNMAXIMIZE, 50 | IMAGE_MAXIMIZE, 51 | IMAGE_CLOSE, 52 | 53 | IMAGES_BUTTONS 54 | } ImageStates; 55 | 56 | /* we will also index image states for convenience */ 57 | typedef enum { 58 | IMAGE_UNFOCUSED = 0, 59 | IMAGE_FOCUSED, 60 | IMAGE_PRELIGHT, 61 | IMAGE_PRESSED, 62 | 63 | IMAGES_STATES 64 | } WBImageIndices; 65 | 66 | typedef struct { 67 | GtkBuilder *builder; 68 | gboolean only_maximized; // [T/F] Only track maximized windows 69 | gboolean show_on_desktop; // [T/F] Show the plugin on desktop 70 | gchar *theme; // Selected theme path 71 | gchar *button_layout; // Button layout ["XXX"] (example "HMC" : H=Hide, M=Maximize/unMaximize, C=Close) 72 | gboolean sync_wm_theme; // [T/F] Try to use xfwm4 active theme if possible. 73 | gint inactive_text_alpha; // Title inactive alpha 74 | gint inactive_text_shade; // Title inactive shade 75 | } WBPreferences; 76 | 77 | /* Definition for our button */ 78 | typedef struct { 79 | GtkEventBox *eventbox; 80 | GtkImage *image; 81 | } WindowButton; 82 | 83 | /* plugin structure for title and buttons*/ 84 | typedef struct { 85 | XfcePanelPlugin *plugin; 86 | 87 | /* Widgets */ 88 | GtkWidget *ebox; 89 | GtkWidget *hvbox; 90 | 91 | WindowButton **button; // Array of buttons 92 | 93 | WBPreferences *prefs; // Main properties 94 | WckUtils *win; 95 | 96 | GdkPixbuf *pixbufs[IMAGES_STATES][IMAGES_BUTTONS]; 97 | XfconfChannel *wm_channel; // window manager chanel 98 | XfconfChannel *x_channel; // xsettings chanel 99 | gulong wph; // xfwm chanel property changed handler id 100 | } WBPlugin; 101 | 102 | void wckbuttons_save (XfcePanelPlugin *plugin, WBPlugin *wb); 103 | 104 | G_END_DECLS 105 | 106 | #endif /* !__WCKBUTTONS_H__ */ 107 | -------------------------------------------------------------------------------- /panel-plugin/title/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = \ 2 | -I$(top_srcdir) \ 3 | -DG_LOG_DOMAIN=\"xfce4-windowck-plugin\" \ 4 | -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \ 5 | $(PLATFORM_CPPFLAGS) 6 | 7 | # 8 | # Windowck plugin 9 | # 10 | plugin_LTLIBRARIES = \ 11 | libwindowck.la 12 | 13 | plugindir = \ 14 | $(libdir)/xfce4/panel/plugins 15 | 16 | libwindowck_built_sources = \ 17 | windowck-dialogs_ui.h 18 | 19 | 20 | libwindowck_la_SOURCES = \ 21 | $(libwindowck_built_sources) \ 22 | windowck.c \ 23 | windowck.h \ 24 | windowck-dialogs.c \ 25 | windowck-dialogs.h \ 26 | windowck-title.h \ 27 | windowck-title.c 28 | 29 | libwindowck_la_CFLAGS = \ 30 | $(GTK_CFLAGS) \ 31 | $(LIBXFCE4UTIL_CFLAGS) \ 32 | $(LIBXFCE4UI_CFLAGS) \ 33 | $(LIBXFCE4PANEL_CFLAGS) \ 34 | $(LIBWNCK_CFLAGS) \ 35 | $(XFCONF_CFLAGS) \ 36 | $(PLATFORM_CFLAGS) 37 | 38 | libwindowck_la_LDFLAGS = \ 39 | -avoid-version \ 40 | -module \ 41 | -no-undefined \ 42 | -export-symbols-regex '^xfce_panel_module_(preinit|init|construct)' \ 43 | $(PLATFORM_LDFLAGS) 44 | 45 | libwindowck_la_LIBADD = \ 46 | $(top_builddir)/common/libwck-common.la \ 47 | $(GTK_LIBS) \ 48 | $(LIBXFCE4UTIL_LIBS) \ 49 | $(LIBXFCE4UI_LIBS) \ 50 | $(LIBXFCE4PANEL_LIBS) \ 51 | $(LIBWNCK_LIBS) \ 52 | $(XFCONF_LIBS) 53 | 54 | libwindowck_la_DEPENDENCIES = \ 55 | $(top_builddir)/common/libwck-common.la 56 | 57 | # 58 | # Desktop file 59 | # 60 | desktopdir = \ 61 | $(datadir)/xfce4/panel/plugins 62 | 63 | desktop_DATA = \ 64 | windowck-plugin.desktop 65 | 66 | @INTLTOOL_DESKTOP_RULE@ 67 | 68 | EXTRA_DIST = \ 69 | windowck-dialogs.glade \ 70 | windowck-plugin.desktop.in 71 | 72 | CLEANFILES = \ 73 | $(desktop_DATA) 74 | 75 | BUILT_SOURCES = \ 76 | $(libwindowck_built_sources) 77 | 78 | CLEANFILES += \ 79 | $(libwindowck_built_sources) 80 | 81 | windowck-dialogs_ui.h: windowck-dialogs.glade 82 | $(AM_V_GEN) exo-csource --static --strip-comments --strip-content --name=windowck_dialogs_ui $< >$@ 83 | 84 | # vi:set ts=8 sw=8 noet ai nocindent syntax=automake: 85 | -------------------------------------------------------------------------------- /panel-plugin/title/windowck-dialogs.h: -------------------------------------------------------------------------------- 1 | /* $Id$ 2 | * 3 | * This program is free software; you can redistribute it and/or modify 4 | * it under the terms of the GNU General Public License as published by 5 | * the Free Software Foundation; either version 3 of the License, or 6 | * (at your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program; if not, write to the Free Software Foundation, Inc., 15 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | * 17 | * Copyright (C) 2013 Alessio Piccoli 18 | * Cedric Leporcq 19 | * 20 | */ 21 | 22 | #ifndef __WINDOWCK_DIALOGS_H__ 23 | #define __WINDOWCK_DIALOGS_H__ 24 | 25 | G_BEGIN_DECLS 26 | 27 | void windowck_configure(XfcePanelPlugin *plugin, WindowckPlugin *wckp); 28 | 29 | G_END_DECLS 30 | 31 | #endif /* !__WINDOWCK_DIALOGS_H__ */ 32 | -------------------------------------------------------------------------------- /panel-plugin/title/windowck-plugin.desktop.in: -------------------------------------------------------------------------------- 1 | [Xfce Panel] 2 | Type=X-XFCE-PanelPlugin 3 | Encoding=UTF-8 4 | _Name=Window Header - Title 5 | _Comment=Put the maximized window title on the panel. 6 | Icon=windowck-plugin 7 | X-XFCE-Module=windowck 8 | X-XFCE-Internal=false 9 | X-XFCE-Unique=false 10 | -------------------------------------------------------------------------------- /panel-plugin/title/windowck-title.h: -------------------------------------------------------------------------------- 1 | /* $Id$ 2 | * 3 | * This program is free software; you can redistribute it and/or modify 4 | * it under the terms of the GNU General Public License as published by 5 | * the Free Software Foundation; either version 3 of the License, or 6 | * (at your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program; if not, write to the Free Software Foundation, Inc., 15 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | * 17 | * Copyright (C) 2013 Cedric Leporcq 18 | * 19 | */ 20 | 21 | #ifndef WINDOWCK_TITLE_H_ 22 | #define WINDOWCK_TITLE_H_ 23 | 24 | #include "windowck.h" 25 | 26 | #define TITLE_SIZE_MAX 999 /* title size max for expand option in characters */ 27 | 28 | void init_title (WindowckPlugin *wckp); 29 | void resize_title(WindowckPlugin *wckp); 30 | void reload_wnck_title (WindowckPlugin *wckp); 31 | void update_font(WindowckPlugin *wckp); 32 | gboolean on_title_pressed(GtkWidget *title, GdkEventButton *event, WindowckPlugin *wckp); 33 | gboolean on_title_released(GtkWidget *title, GdkEventButton *event, WindowckPlugin *wckp); 34 | gboolean on_icon_released(GtkWidget *title, GdkEventButton *event, WindowckPlugin *wckp); 35 | 36 | #endif /* WINDOWCK_TITLE_H_ */ 37 | -------------------------------------------------------------------------------- /panel-plugin/title/windowck.c: -------------------------------------------------------------------------------- 1 | /* $Id$ 2 | * 3 | * This program is free software; you can redistribute it and/or modify 4 | * it under the terms of the GNU General Public License as published by 5 | * the Free Software Foundation; either version 3 of the License, or 6 | * (at your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program; if not, write to the Free Software Foundation, Inc., 15 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | * 17 | * Copyright (C) 2013 Alessio Piccoli 18 | * Cedric Leporcq 19 | * 20 | */ 21 | 22 | #ifdef HAVE_CONFIG_H 23 | #include 24 | #endif 25 | #ifdef HAVE_STRING_H 26 | #include 27 | #endif 28 | 29 | #include 30 | #include 31 | #include 32 | 33 | #include "windowck.h" 34 | #include "windowck-dialogs.h" 35 | #include "windowck-title.h" 36 | 37 | /* default settings */ 38 | #define DEFAULT_ONLY_MAXIMIZED TRUE 39 | #define DEFAULT_SHOW_ON_DESKTOP FALSE 40 | #define DEFAULT_HIDE_TITLE FALSE 41 | #define DEFAULT_FULL_NAME TRUE 42 | #define DEFAULT_TWO_LINES FALSE 43 | #define DEFAULT_SHOW_TOOLTIPS TRUE 44 | #define DEFAULT_SHOW_APP_ICON TRUE 45 | #define DEFAULT_ICON_ON_RIGHT FALSE 46 | #define DEFAULT_SHOW_WINDOW_MENU TRUE 47 | #define DEFAULT_SIZE_MODE FIXE 48 | #define DEFAULT_TITLE_SIZE 80 49 | #define DEFAULT_TITLE_ALIGNMENT CENTER 50 | #define DEFAULT_TITLE_PADDING 3 51 | #define DEFAULT_SYNC_WM_FONT TRUE 52 | #define DEFAULT_TITLE_FONT "sans 10" 53 | #define DEFAULT_SUBTITLE_FONT "sans 10" 54 | #define DEFAULT_INACTIVE_TEXT_ALPHA 60 55 | #define DEFAULT_INACTIVE_TEXT_SHADE 110 56 | 57 | /* prototypes */ 58 | static void windowck_construct(XfcePanelPlugin *plugin); 59 | 60 | 61 | void windowck_save(XfcePanelPlugin *plugin, WindowckPlugin *wckp) 62 | { 63 | XfceRc *rc; 64 | gchar *file; 65 | 66 | /* get the config file location */ 67 | file = xfce_panel_plugin_save_location(plugin, TRUE); 68 | 69 | if (G_UNLIKELY (file == NULL)) 70 | { 71 | DBG("Failed to open config file"); 72 | return; 73 | } 74 | 75 | /* open the config file, read/write */ 76 | rc = xfce_rc_simple_open(file, FALSE); 77 | g_free(file); 78 | 79 | if (G_LIKELY (rc != NULL)) 80 | { 81 | /* save the settings */ 82 | DBG("."); 83 | xfce_rc_write_bool_entry(rc, "only_maximized", wckp->prefs->only_maximized); 84 | xfce_rc_write_bool_entry(rc, "show_on_desktop", wckp->prefs->show_on_desktop); 85 | xfce_rc_write_bool_entry(rc, "show_app_icon", wckp->prefs->show_app_icon); 86 | xfce_rc_write_bool_entry(rc, "icon_on_right", wckp->prefs->icon_on_right); 87 | xfce_rc_write_bool_entry(rc, "show_window_menu", wckp->prefs->show_window_menu); 88 | xfce_rc_write_bool_entry(rc, "hide_title", wckp->prefs->hide_title); 89 | xfce_rc_write_bool_entry(rc, "full_name", wckp->prefs->full_name); 90 | xfce_rc_write_bool_entry(rc, "two_lines", wckp->prefs->two_lines); 91 | xfce_rc_write_bool_entry(rc, "show_tooltips", wckp->prefs->show_tooltips); 92 | xfce_rc_write_int_entry(rc, "size_mode", wckp->prefs->size_mode); 93 | xfce_rc_write_int_entry(rc, "title_size", wckp->prefs->title_size); 94 | xfce_rc_write_bool_entry(rc, "sync_wm_font", wckp->prefs->sync_wm_font); 95 | if (wckp->prefs->title_font) 96 | xfce_rc_write_entry(rc, "title_font", wckp->prefs->title_font); 97 | 98 | if (wckp->prefs->subtitle_font) 99 | xfce_rc_write_entry(rc, "subtitle_font", wckp->prefs->subtitle_font); 100 | 101 | xfce_rc_write_int_entry(rc, "title_alignment", wckp->prefs->title_alignment); 102 | xfce_rc_write_int_entry(rc, "title_padding", wckp->prefs->title_padding); 103 | xfce_rc_write_int_entry(rc, "inactive_text_alpha", wckp->prefs->inactive_text_alpha); 104 | xfce_rc_write_int_entry(rc, "inactive_text_shade", wckp->prefs->inactive_text_shade); 105 | 106 | /* close the rc file */ 107 | xfce_rc_close(rc); 108 | } 109 | } 110 | 111 | 112 | static void windowck_read(WindowckPlugin *wckp) 113 | { 114 | XfceRc *rc; 115 | gchar *file; 116 | const gchar *title_font, *subtitle_font; 117 | 118 | /* allocate memory for the preferences structure */ 119 | wckp->prefs = g_slice_new0(WCKPreferences); 120 | 121 | /* get the plugin config file location */ 122 | file = xfce_panel_plugin_save_location(wckp->plugin, TRUE); 123 | 124 | if (G_LIKELY (file != NULL)) 125 | { 126 | /* open the config file, readonly */ 127 | rc = xfce_rc_simple_open(file, TRUE); 128 | 129 | /* cleanup */ 130 | g_free(file); 131 | 132 | if (G_LIKELY (rc != NULL)) 133 | { 134 | /* read the settings */ 135 | wckp->prefs->only_maximized = xfce_rc_read_bool_entry(rc, "only_maximized", DEFAULT_ONLY_MAXIMIZED); 136 | wckp->prefs->show_on_desktop = xfce_rc_read_bool_entry(rc, "show_on_desktop", DEFAULT_SHOW_ON_DESKTOP); 137 | wckp->prefs->show_app_icon = xfce_rc_read_bool_entry(rc, "show_app_icon", DEFAULT_SHOW_APP_ICON); 138 | wckp->prefs->icon_on_right = xfce_rc_read_bool_entry(rc, "icon_on_right", DEFAULT_ICON_ON_RIGHT); 139 | wckp->prefs->show_window_menu = xfce_rc_read_bool_entry(rc, "show_window_menu", DEFAULT_SHOW_WINDOW_MENU); 140 | wckp->prefs->hide_title = xfce_rc_read_bool_entry(rc, "hide_title", DEFAULT_HIDE_TITLE); 141 | wckp->prefs->full_name = xfce_rc_read_bool_entry(rc, "full_name", DEFAULT_FULL_NAME); 142 | wckp->prefs->two_lines = xfce_rc_read_bool_entry(rc, "two_lines", DEFAULT_TWO_LINES); 143 | wckp->prefs->show_tooltips = xfce_rc_read_bool_entry(rc, "show_tooltips", DEFAULT_SHOW_TOOLTIPS); 144 | wckp->prefs->size_mode = xfce_rc_read_int_entry (rc, "size_mode", DEFAULT_SIZE_MODE); 145 | wckp->prefs->title_size = xfce_rc_read_int_entry(rc, "title_size", DEFAULT_TITLE_SIZE); 146 | wckp->prefs->sync_wm_font = xfce_rc_read_bool_entry(rc, "sync_wm_font", DEFAULT_SYNC_WM_FONT); 147 | title_font = xfce_rc_read_entry(rc, "title_font", DEFAULT_TITLE_FONT); 148 | wckp->prefs->title_font = g_strdup(title_font); 149 | subtitle_font = xfce_rc_read_entry(rc, "subtitle_font", DEFAULT_SUBTITLE_FONT); 150 | wckp->prefs->subtitle_font = g_strdup(subtitle_font); 151 | wckp->prefs->title_alignment = xfce_rc_read_int_entry(rc, "title_alignment", DEFAULT_TITLE_ALIGNMENT); 152 | wckp->prefs->title_padding = xfce_rc_read_int_entry(rc, "title_padding", DEFAULT_TITLE_PADDING); 153 | wckp->prefs->inactive_text_alpha = xfce_rc_read_int_entry(rc, "inactive_text_alpha", DEFAULT_INACTIVE_TEXT_ALPHA); 154 | wckp->prefs->inactive_text_shade = xfce_rc_read_int_entry(rc, "inactive_text_shade", DEFAULT_INACTIVE_TEXT_SHADE); 155 | 156 | /* cleanup */ 157 | xfce_rc_close(rc); 158 | 159 | /* leave the function, everything went well */ 160 | return; 161 | } 162 | } 163 | 164 | /* something went wrong, apply default values */ 165 | DBG("Applying default settings"); 166 | 167 | wckp->prefs->only_maximized = DEFAULT_ONLY_MAXIMIZED; 168 | wckp->prefs->show_on_desktop = DEFAULT_SHOW_ON_DESKTOP; 169 | wckp->prefs->show_app_icon = DEFAULT_SHOW_APP_ICON; 170 | wckp->prefs->icon_on_right = DEFAULT_ICON_ON_RIGHT; 171 | wckp->prefs->show_window_menu = DEFAULT_SHOW_WINDOW_MENU; 172 | wckp->prefs->hide_title = DEFAULT_HIDE_TITLE; 173 | wckp->prefs->full_name = DEFAULT_FULL_NAME; 174 | wckp->prefs->two_lines = DEFAULT_TWO_LINES; 175 | wckp->prefs->show_tooltips = DEFAULT_SHOW_TOOLTIPS; 176 | wckp->prefs->size_mode = DEFAULT_SIZE_MODE; 177 | wckp->prefs->title_size = DEFAULT_TITLE_SIZE; 178 | wckp->prefs->sync_wm_font = DEFAULT_SYNC_WM_FONT; 179 | wckp->prefs->title_font = DEFAULT_TITLE_FONT; 180 | wckp->prefs->subtitle_font = DEFAULT_SUBTITLE_FONT; 181 | wckp->prefs->title_alignment = DEFAULT_TITLE_ALIGNMENT; 182 | wckp->prefs->title_padding = DEFAULT_TITLE_PADDING; 183 | wckp->prefs->inactive_text_alpha = DEFAULT_INACTIVE_TEXT_ALPHA; 184 | wckp->prefs->inactive_text_shade = DEFAULT_INACTIVE_TEXT_SHADE; 185 | } 186 | 187 | 188 | void create_symbol (gboolean show_app_icon, WindowckPlugin *wckp) 189 | { 190 | if (GTK_IS_WIDGET (wckp->icon->symbol)) 191 | gtk_widget_destroy (wckp->icon->symbol); 192 | 193 | if (wckp->prefs->show_window_menu) 194 | { 195 | if (show_app_icon) 196 | wckp->icon->symbol = xfce_panel_image_new(); 197 | else 198 | wckp->icon->symbol = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_NONE); 199 | 200 | gtk_container_add (GTK_CONTAINER (wckp->icon->eventbox), wckp->icon->symbol); 201 | gtk_widget_show_all (GTK_WIDGET(wckp->icon->eventbox)); 202 | } 203 | else 204 | { 205 | gtk_widget_hide_all (GTK_WIDGET(wckp->icon->eventbox)); 206 | } 207 | } 208 | 209 | 210 | static void create_icon (WindowckPlugin *wckp) 211 | { 212 | wckp->icon = g_slice_new0 (WindowIcon); 213 | wckp->icon->eventbox = GTK_EVENT_BOX (gtk_event_box_new()); 214 | wckp->icon->symbol = NULL; 215 | 216 | gtk_widget_set_can_focus (GTK_WIDGET(wckp->icon->eventbox), TRUE); 217 | 218 | gtk_event_box_set_visible_window (wckp->icon->eventbox, FALSE); 219 | 220 | gtk_box_pack_start (GTK_BOX (wckp->hvbox), GTK_WIDGET(wckp->icon->eventbox), FALSE, FALSE, 0); 221 | 222 | create_symbol (wckp->prefs->show_app_icon, wckp); 223 | } 224 | 225 | 226 | static WindowckPlugin * windowck_new(XfcePanelPlugin *plugin) 227 | { 228 | WindowckPlugin *wckp; 229 | 230 | GtkOrientation orientation; 231 | GtkWidget *label; 232 | 233 | /* allocate memory for the plugin structure */ 234 | wckp = g_slice_new0 (WindowckPlugin); 235 | 236 | /* pointer to plugin */ 237 | wckp->plugin = plugin; 238 | 239 | /* read the user settings */ 240 | windowck_read(wckp); 241 | 242 | /* get the current orientation */ 243 | orientation = xfce_panel_plugin_get_orientation(plugin); 244 | 245 | /* not needed for shrink mode */ 246 | if (wckp->prefs->size_mode != SHRINK) 247 | xfce_panel_plugin_set_shrink (plugin, TRUE); 248 | 249 | /* create some panel widgets */ 250 | wckp->ebox = gtk_event_box_new(); 251 | gtk_event_box_set_visible_window(GTK_EVENT_BOX(wckp->ebox), FALSE); 252 | gtk_widget_set_name(wckp->ebox, "XfceWindowckPlugin"); 253 | 254 | wckp->alignment = gtk_alignment_new (0.5, 0.5, 1, 1); 255 | 256 | wckp->hvbox = xfce_hvbox_new(orientation, FALSE, 2); 257 | 258 | /* some wckp widgets */ 259 | label = gtk_label_new(""); 260 | wckp->title = GTK_LABEL (label); 261 | 262 | create_icon (wckp); 263 | 264 | gtk_box_pack_start (GTK_BOX(wckp->hvbox), label, TRUE, TRUE, 0); 265 | 266 | if (wckp->prefs->icon_on_right) 267 | { 268 | gtk_box_reorder_child (GTK_BOX (wckp->hvbox), GTK_WIDGET(wckp->icon->eventbox), 1); 269 | } 270 | 271 | gtk_container_add(GTK_CONTAINER(wckp->alignment), GTK_WIDGET(wckp->hvbox)); 272 | gtk_container_add(GTK_CONTAINER(wckp->ebox), wckp->alignment); 273 | 274 | /* show widgets */ 275 | gtk_widget_show(wckp->ebox); 276 | gtk_widget_show(wckp->alignment); 277 | gtk_widget_show(wckp->hvbox); 278 | gtk_widget_show(label); 279 | 280 | return wckp; 281 | } 282 | 283 | 284 | static void windowck_free(XfcePanelPlugin *plugin, WindowckPlugin *wckp) 285 | { 286 | GtkWidget *dialog; 287 | 288 | /* check if the dialog is still open. if so, destroy it */ 289 | dialog = g_object_get_data(G_OBJECT (plugin), "dialog"); 290 | if (G_UNLIKELY (dialog != NULL)) 291 | gtk_widget_destroy(dialog); 292 | 293 | /* destroy the panel widgets */ 294 | gtk_widget_destroy(wckp->hvbox); 295 | 296 | /* free the plugin structure */ 297 | g_slice_free(WindowIcon, wckp->icon); 298 | g_slice_free(WckUtils, wckp->win); 299 | g_slice_free(WCKPreferences, wckp->prefs); 300 | g_slice_free(WindowckPlugin, wckp); 301 | } 302 | 303 | 304 | static void windowck_orientation_changed(XfcePanelPlugin *plugin, GtkOrientation orientation, WindowckPlugin *wckp) 305 | { 306 | /* change the orienation of the box */ 307 | xfce_hvbox_set_orientation(XFCE_HVBOX (wckp->hvbox), orientation); 308 | } 309 | 310 | 311 | static void windowck_screen_position_changed(XfcePanelPlugin *plugin, XfceScreenPosition *position, WindowckPlugin *wckp) 312 | { 313 | if (wckp->prefs->size_mode != SHRINK) 314 | { 315 | xfce_panel_plugin_set_shrink (plugin, FALSE); 316 | gtk_label_set_width_chars(wckp->title, 1); 317 | xfce_panel_plugin_set_shrink (plugin, TRUE); 318 | resize_title(wckp); 319 | } 320 | } 321 | 322 | 323 | static gboolean windowck_size_changed(XfcePanelPlugin *plugin, gint size, WindowckPlugin *wckp) 324 | { 325 | GtkOrientation orientation; 326 | 327 | /* get the orientation of the plugin */ 328 | orientation = xfce_panel_plugin_get_orientation(plugin); 329 | 330 | /* set the widget size */ 331 | if (orientation == GTK_ORIENTATION_HORIZONTAL) 332 | gtk_widget_set_size_request(GTK_WIDGET (plugin), -1, size); 333 | else 334 | gtk_widget_set_size_request(GTK_WIDGET (plugin), size, -1); 335 | 336 | /* we handled the orientation */ 337 | return TRUE; 338 | } 339 | 340 | 341 | static void on_refresh_item_activated (GtkMenuItem *refresh, WindowckPlugin *wckp) 342 | { 343 | init_title(wckp); 344 | reload_wnck_title (wckp); 345 | } 346 | 347 | 348 | static void windowck_construct(XfcePanelPlugin *plugin) 349 | { 350 | WindowckPlugin *wckp; 351 | GtkWidget *refresh; 352 | 353 | /* setup transation domain */ 354 | xfce_textdomain(GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8"); 355 | 356 | /* create the plugin */ 357 | wckp = windowck_new(plugin); 358 | 359 | /* add the ebox to the panel */ 360 | gtk_container_add(GTK_CONTAINER (plugin), wckp->ebox); 361 | 362 | /* show the panel's right-click menu on this ebox */ 363 | xfce_panel_plugin_add_action_widget(plugin, wckp->ebox); 364 | 365 | // Set event handling (icon & title clicks) 366 | g_signal_connect(G_OBJECT (wckp->ebox), "button-press-event", G_CALLBACK (on_title_pressed), wckp); 367 | 368 | g_signal_connect(G_OBJECT (wckp->ebox), "button-release-event", G_CALLBACK (on_title_released), wckp); 369 | 370 | g_signal_connect(G_OBJECT (wckp->icon->eventbox), "button-release-event", G_CALLBACK (on_icon_released), wckp); 371 | 372 | /* connect plugin signals */ 373 | 374 | g_signal_connect(G_OBJECT (plugin), "free-data", G_CALLBACK (windowck_free), wckp); 375 | 376 | g_signal_connect(G_OBJECT (plugin), "save", G_CALLBACK (windowck_save), wckp); 377 | 378 | g_signal_connect(G_OBJECT (plugin), "size-changed", G_CALLBACK (windowck_size_changed), wckp); 379 | 380 | g_signal_connect(G_OBJECT (plugin), "screen-position-changed", G_CALLBACK (windowck_screen_position_changed), wckp); 381 | 382 | g_signal_connect(G_OBJECT (plugin), "orientation-changed", G_CALLBACK (windowck_orientation_changed), wckp); 383 | 384 | /* show the configure menu item and connect signal */ 385 | xfce_panel_plugin_menu_show_configure(plugin); 386 | g_signal_connect(G_OBJECT (plugin), "configure-plugin", G_CALLBACK (windowck_configure), wckp); 387 | 388 | /* show the about menu item and connect signal */ 389 | xfce_panel_plugin_menu_show_about(plugin); 390 | g_signal_connect (G_OBJECT (plugin), "about", 391 | G_CALLBACK (wck_about), "windowck-plugin"); 392 | 393 | /* add custom menu items */ 394 | refresh = show_refresh_item (plugin); 395 | g_signal_connect (G_OBJECT (refresh), "activate", G_CALLBACK (on_refresh_item_activated), wckp); 396 | 397 | /* start tracking title text */ 398 | wckp->win = g_slice_new0 (WckUtils); 399 | init_wnck(wckp->win, wckp->prefs->only_maximized, wckp); 400 | 401 | /* start tracking title size */ 402 | init_title(wckp); 403 | } 404 | 405 | 406 | /* register the plugin */ 407 | XFCE_PANEL_PLUGIN_REGISTER(windowck_construct); 408 | -------------------------------------------------------------------------------- /panel-plugin/title/windowck.h: -------------------------------------------------------------------------------- 1 | /* $Id$ 2 | * 3 | * This program is free software; you can redistribute it and/or modify 4 | * it under the terms of the GNU General Public License as published by 5 | * the Free Software Foundation; either version 3 of the License, or 6 | * (at your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program; if not, write to the Free Software Foundation, Inc., 15 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | * 17 | * Copyright (C) 2013 Alessio Piccoli 18 | * Cedric Leporcq 19 | * 20 | */ 21 | 22 | #ifndef __WINDOWCK_H__ 23 | #define __WINDOWCK_H__ 24 | 25 | #ifdef HAVE_CONFIG_H 26 | #include 27 | #endif 28 | 29 | #ifdef HAVE_STRING_H 30 | #include 31 | #endif 32 | 33 | #include 34 | #include 35 | #include 36 | 37 | #define ICON_PADDING 3 38 | #define XFCE_PANEL_IS_SMALL (xfce_panel_plugin_get_size (wckp->plugin) < 23) 39 | 40 | G_BEGIN_DECLS 41 | 42 | typedef enum Alignment 43 | { 44 | LEFT = 0, CENTER = 5, RIGHT = 10 45 | } Alignment; 46 | 47 | typedef enum SizeMode 48 | { 49 | SHRINK = 1, FIXE = 2, EXPAND = 3 50 | } SizeMode; 51 | 52 | typedef struct { 53 | GtkEventBox *eventbox; 54 | GtkWidget *symbol; 55 | } WindowIcon; 56 | 57 | typedef struct { 58 | GtkBuilder *builder; 59 | gboolean only_maximized; // [T/F] Only track maximized windows 60 | gboolean show_on_desktop; // [T/F] Show the plugin on desktop 61 | //gboolean hide_icon; // [T/F] Hide the icon 62 | gboolean hide_title; // [T/F] Hide the title 63 | gboolean show_app_icon; // [T/F] Show the window icon 64 | gboolean icon_on_right; // [T/F] Place icon on the right 65 | gboolean show_window_menu; // [T/F] Show window action menu 66 | gboolean full_name; // [T/F] Show full name 67 | gboolean two_lines; // [T/F] Display the title on two lines 68 | gboolean show_tooltips; // [T/F] Show tooltips 69 | 70 | SizeMode size_mode; // Size mode : Length=[MINIMAL,FIXE,EXPAND] 71 | 72 | gint title_size; // Title size in chars 73 | gint title_padding; // Title padding 74 | 75 | gboolean sync_wm_font; // [T/F] Try to use xfwm4 active theme if possible. 76 | gchar *title_font; // Title font 77 | gchar *subtitle_font; // Subtitle font 78 | gint title_alignment; // Title alignment [LEFT, CENTER, RIGHT] 79 | gint inactive_text_alpha; // Title inactive alpha 80 | gint inactive_text_shade; // Title inactive shade 81 | gchar *active_text_color; // active text color 82 | gchar *inactive_text_color; // inactive text color 83 | } WCKPreferences; 84 | 85 | /* plugin structure */ 86 | typedef struct { 87 | XfcePanelPlugin *plugin; 88 | 89 | /* Widgets */ 90 | GtkWidget *ebox; 91 | GtkWidget *hvbox; 92 | GtkWidget *alignment; 93 | GtkLabel *title; 94 | WindowIcon *icon; // Icon widget 95 | 96 | WCKPreferences *prefs; 97 | WckUtils *win; 98 | 99 | gulong cnh; // controled window name handler id 100 | gulong cih; // controled window icon handler id 101 | 102 | XfconfChannel *wm_channel; // window manager chanel 103 | XfconfChannel *x_channel; // xsettings chanel 104 | } WindowckPlugin; 105 | 106 | void windowck_save(XfcePanelPlugin *plugin, WindowckPlugin *wckp); 107 | void create_symbol (gboolean show_app_icon, WindowckPlugin *wckp); 108 | 109 | G_END_DECLS 110 | 111 | #endif /* !__WINDOWCK_H__ */ 112 | -------------------------------------------------------------------------------- /po/POTFILES.in: -------------------------------------------------------------------------------- 1 | panel-plugin/title/windowck-dialogs.c 2 | panel-plugin/title/windowck-dialogs.glade 3 | panel-plugin/title/windowck-plugin.desktop.in 4 | panel-plugin/buttons/wckbuttons-dialogs.c 5 | panel-plugin/buttons/wckbuttons-dialogs.glade 6 | panel-plugin/buttons/wckbuttons.desktop.in 7 | -------------------------------------------------------------------------------- /po/cs.po: -------------------------------------------------------------------------------- 1 | # Czech translations for xfce4-windowck-plugin package. 2 | # Copyright (C) 2015 THE xfce4-windowck-plugin'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the xfce4-windowck-plugin package. 4 | # Pavel Zlámal , 2015. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: 0.1.1\n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2015-05-11 09:25+0200\n" 11 | "PO-Revision-Date: 2015-05-11 10:51+0100\n" 12 | "Last-Translator: Pavel Zlámal \n" 13 | "Language-Team: Czech\n" 14 | "Language: cs\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "X-Generator: Poedit 1.5.4\n" 19 | 20 | #: ../panel-plugin/title/windowck-dialogs.c:493 21 | #: ../panel-plugin/buttons/wckbuttons-dialogs.c:385 22 | #, c-format 23 | msgid "Unable to open the following url: %s" 24 | msgstr "Nelze otevřít následující url: %s" 25 | 26 | #: ../panel-plugin/title/windowck-dialogs.glade.h:1 27 | msgid "at most" 28 | msgstr "nejvíce" 29 | 30 | #: ../panel-plugin/title/windowck-dialogs.glade.h:2 31 | msgid "fixed to" 32 | msgstr "přesně" 33 | 34 | #: ../panel-plugin/title/windowck-dialogs.glade.h:3 35 | msgid "expand" 36 | msgstr "roztáhnout" 37 | 38 | #: ../panel-plugin/title/windowck-dialogs.glade.h:4 39 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:1 40 | msgid "Control maximized windows." 41 | msgstr "Ovládat maximalizovaná okna." 42 | 43 | #: ../panel-plugin/title/windowck-dialogs.glade.h:5 44 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:2 45 | msgid "Control active windows." 46 | msgstr "Ovládat aktivní okna." 47 | 48 | #: ../panel-plugin/title/windowck-dialogs.glade.h:6 49 | msgid "Show the plugin on desktop." 50 | msgstr "Zobrazit na ploše." 51 | 52 | #: ../panel-plugin/title/windowck-dialogs.glade.h:7 53 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:5 54 | msgid "Behaviour" 55 | msgstr "Chování" 56 | 57 | #: ../panel-plugin/title/windowck-dialogs.glade.h:8 58 | msgid "Width:" 59 | msgstr "Šířka:" 60 | 61 | #: ../panel-plugin/title/windowck-dialogs.glade.h:9 62 | msgid "chars" 63 | msgstr "znaků" 64 | 65 | #: ../panel-plugin/title/windowck-dialogs.glade.h:10 66 | msgid "Padding:" 67 | msgstr "Odsazení:" 68 | 69 | #: ../panel-plugin/title/windowck-dialogs.glade.h:11 70 | msgid "pixels" 71 | msgstr "pixelů" 72 | 73 | #: ../panel-plugin/title/windowck-dialogs.glade.h:12 74 | msgid "Show the full title name" 75 | msgstr "Zobrazit plný text titulku" 76 | 77 | #: ../panel-plugin/title/windowck-dialogs.glade.h:13 78 | msgid "Display the title in two lines" 79 | msgstr "Zobrazit titulek ve dvou řádcích" 80 | 81 | #: ../panel-plugin/title/windowck-dialogs.glade.h:14 82 | msgid "Sync the font with the window manager." 83 | msgstr "Synchronizovat písmo se Správcem oken." 84 | 85 | #: ../panel-plugin/title/windowck-dialogs.glade.h:15 86 | msgid "Subtitle font:" 87 | msgstr "Písmo podtitulku:" 88 | 89 | #: ../panel-plugin/title/windowck-dialogs.glade.h:16 90 | msgid "Title font:" 91 | msgstr "Písmo titulku:" 92 | 93 | #: ../panel-plugin/title/windowck-dialogs.glade.h:17 94 | msgid "Alignment:" 95 | msgstr "Zarovnání:" 96 | 97 | #: ../panel-plugin/title/windowck-dialogs.glade.h:18 98 | msgid "Title" 99 | msgstr "Titulek" 100 | 101 | #: ../panel-plugin/title/windowck-dialogs.glade.h:19 102 | msgid "Show the window menu." 103 | msgstr "Zobrazit nabídku okna." 104 | 105 | #: ../panel-plugin/title/windowck-dialogs.glade.h:20 106 | msgid "Show the window Icon." 107 | msgstr "Zobrazit ikonu okna." 108 | 109 | #: ../panel-plugin/title/windowck-dialogs.glade.h:21 110 | msgid "Place the menu icon on right." 111 | msgstr "Umístit ikonu nabídky vpravo." 112 | 113 | #: ../panel-plugin/title/windowck-dialogs.glade.h:22 114 | msgid "Menu" 115 | msgstr "Nabídka" 116 | 117 | #: ../panel-plugin/title/windowck-dialogs.glade.h:23 118 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:11 119 | msgid "Appearance" 120 | msgstr "Vzhled" 121 | 122 | #: ../panel-plugin/title/windowck-dialogs.glade.h:24 123 | msgid "left" 124 | msgstr "vlevo" 125 | 126 | #: ../panel-plugin/title/windowck-dialogs.glade.h:25 127 | msgid "center" 128 | msgstr "uprostřed" 129 | 130 | #: ../panel-plugin/title/windowck-dialogs.glade.h:26 131 | msgid "right" 132 | msgstr "vpravo" 133 | 134 | #: ../panel-plugin/title/windowck-plugin.desktop.in.h:1 135 | msgid "Window Header - Title" 136 | msgstr "Hlavička okna - Titulek" 137 | 138 | #: ../panel-plugin/title/windowck-plugin.desktop.in.h:2 139 | msgid "Put the maximized window title on the panel." 140 | msgstr "Vloží titulek maximalizovaných oken do panelu." 141 | 142 | #: ../panel-plugin/buttons/wckbuttons-dialogs.c:320 143 | msgid "Directory" 144 | msgstr "Složka" 145 | 146 | #: ../panel-plugin/buttons/wckbuttons-dialogs.c:322 147 | msgid "Themes usable" 148 | msgstr "Dostupné styly" 149 | 150 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:3 151 | msgid "Show the buttons on desktop." 152 | msgstr "Zobrazit tlačítka na ploše." 153 | 154 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:4 155 | msgid "Logout on close button desktop." 156 | msgstr "Odhlásit se pomocí tlačítka Zavřít bez okna na ploše." 157 | 158 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:6 159 | msgid "Get in sync with the window manager theme." 160 | msgstr "Synchronizovat se stylem Správce oken." 161 | 162 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:7 163 | msgid "Button layout:" 164 | msgstr "Rozložení tlačítek:" 165 | 166 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:8 167 | msgid "" 168 | "Put the buttons id in the desired order.\n" 169 | "Example: [HMC]\n" 170 | "H=Hide, M=Maximize/unMaximize, C=Close" 171 | msgstr "" 172 | "Vložte id tlačítek v očekávaném pořadí.\n" 173 | "Příklad: [HMC]\n" 174 | "H=Minimalizovat, M=Maximalizovat/Obnovit, C=Zavřít" 175 | 176 | #: ../panel-plugin/buttons/wckbuttons.desktop.in.h:1 177 | msgid "Window Header - Buttons" 178 | msgstr "Hlavička okna - Tlačítka" 179 | 180 | #: ../panel-plugin/buttons/wckbuttons.desktop.in.h:2 181 | msgid "Put the maximized window buttons on the panel." 182 | msgstr "Vloží tlačítka pro ovládání okna do panelu." 183 | -------------------------------------------------------------------------------- /po/fr.po: -------------------------------------------------------------------------------- 1 | # French translations for xfce4-windowck-plugin package. 2 | # Copyright (C) 2013 THE xfce4-windowck-plugin'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the xfce4-windowck-plugin package. 4 | # Cédric Leporcq , 2013. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: 0.1.1\n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2015-05-16 15:02+0200\n" 11 | "PO-Revision-Date: 2015-03-22 18:39+0100\n" 12 | "Last-Translator: Cédric Leporcq \n" 13 | "Language-Team: French\n" 14 | "Language: fr\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "X-Generator: Poedit 1.7.4\n" 19 | 20 | #: ../panel-plugin/title/windowck-dialogs.c:493 21 | #: ../panel-plugin/buttons/wckbuttons-dialogs.c:378 22 | #, c-format 23 | msgid "Unable to open the following url: %s" 24 | msgstr "Impossible d'ouvrir l'url suivant : %s" 25 | 26 | #: ../panel-plugin/title/windowck-dialogs.glade.h:1 27 | msgid "at most" 28 | msgstr "au plus" 29 | 30 | #: ../panel-plugin/title/windowck-dialogs.glade.h:2 31 | msgid "fixed to" 32 | msgstr "fixée à" 33 | 34 | #: ../panel-plugin/title/windowck-dialogs.glade.h:3 35 | msgid "expand" 36 | msgstr "étendre" 37 | 38 | #: ../panel-plugin/title/windowck-dialogs.glade.h:4 39 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:1 40 | msgid "Control maximized windows." 41 | msgstr "Contrôler les fenêtres maximisées." 42 | 43 | #: ../panel-plugin/title/windowck-dialogs.glade.h:5 44 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:2 45 | msgid "Control active windows." 46 | msgstr "Contrôler les fenêtres actives." 47 | 48 | #: ../panel-plugin/title/windowck-dialogs.glade.h:6 49 | msgid "Show the plugin on desktop." 50 | msgstr "Afficher le plugin sur le bureau." 51 | 52 | #: ../panel-plugin/title/windowck-dialogs.glade.h:7 53 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:5 54 | msgid "Behaviour" 55 | msgstr "Comportement" 56 | 57 | #: ../panel-plugin/title/windowck-dialogs.glade.h:8 58 | msgid "Width:" 59 | msgstr "Largeur :" 60 | 61 | #: ../panel-plugin/title/windowck-dialogs.glade.h:9 62 | msgid "chars" 63 | msgstr "caractères" 64 | 65 | #: ../panel-plugin/title/windowck-dialogs.glade.h:10 66 | msgid "Padding:" 67 | msgstr "Espacement :" 68 | 69 | #: ../panel-plugin/title/windowck-dialogs.glade.h:11 70 | msgid "pixels" 71 | msgstr "pixels" 72 | 73 | #: ../panel-plugin/title/windowck-dialogs.glade.h:12 74 | msgid "Show the full title name" 75 | msgstr "Afficher le titre complet des fenêtres." 76 | 77 | #: ../panel-plugin/title/windowck-dialogs.glade.h:13 78 | msgid "Display the title in two lines" 79 | msgstr "Afficher le titre sur deux lignes" 80 | 81 | #: ../panel-plugin/title/windowck-dialogs.glade.h:14 82 | msgid "Sync the font with the window manager." 83 | msgstr "Synchroniser la police avec le gestionnaire de fenêtres." 84 | 85 | #: ../panel-plugin/title/windowck-dialogs.glade.h:15 86 | msgid "Subtitle font:" 87 | msgstr "Police du sous-titre :" 88 | 89 | #: ../panel-plugin/title/windowck-dialogs.glade.h:16 90 | msgid "Title font:" 91 | msgstr "Police du titre :" 92 | 93 | #: ../panel-plugin/title/windowck-dialogs.glade.h:17 94 | msgid "Alignment:" 95 | msgstr "Alignement :" 96 | 97 | #: ../panel-plugin/title/windowck-dialogs.glade.h:18 98 | msgid "Title" 99 | msgstr "Titre" 100 | 101 | #: ../panel-plugin/title/windowck-dialogs.glade.h:19 102 | msgid "Show the window menu." 103 | msgstr "Afficher le menu des fenêtres." 104 | 105 | #: ../panel-plugin/title/windowck-dialogs.glade.h:20 106 | msgid "Show the window Icon." 107 | msgstr "Afficher l'icône des fenêtres." 108 | 109 | #: ../panel-plugin/title/windowck-dialogs.glade.h:21 110 | msgid "Place the menu icon on right." 111 | msgstr "Placer l'icône du menu sur la droite." 112 | 113 | #: ../panel-plugin/title/windowck-dialogs.glade.h:22 114 | msgid "Menu" 115 | msgstr "Menu" 116 | 117 | #: ../panel-plugin/title/windowck-dialogs.glade.h:23 118 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:11 119 | msgid "Appearance" 120 | msgstr "Apparence" 121 | 122 | #: ../panel-plugin/title/windowck-dialogs.glade.h:24 123 | msgid "left" 124 | msgstr "gauche" 125 | 126 | #: ../panel-plugin/title/windowck-dialogs.glade.h:25 127 | msgid "center" 128 | msgstr "centré" 129 | 130 | #: ../panel-plugin/title/windowck-dialogs.glade.h:26 131 | msgid "right" 132 | msgstr "droite" 133 | 134 | #: ../panel-plugin/title/windowck-plugin.desktop.in.h:1 135 | msgid "Window Header - Title" 136 | msgstr "Entête des Fenêtres - Titre" 137 | 138 | #: ../panel-plugin/title/windowck-plugin.desktop.in.h:2 139 | msgid "Put the maximized window title on the panel." 140 | msgstr "Placer le titre des fenêtres maximisées sur le tableau de bord." 141 | 142 | #: ../panel-plugin/buttons/wckbuttons-dialogs.c:314 143 | msgid "Directory" 144 | msgstr "Répertoire" 145 | 146 | #: ../panel-plugin/buttons/wckbuttons-dialogs.c:316 147 | msgid "Themes usable" 148 | msgstr "Thèmes utilisables" 149 | 150 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:3 151 | msgid "Show the buttons on desktop." 152 | msgstr "Afficher le plugin sur le bureau." 153 | 154 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:4 155 | msgid "Logout on close button desktop." 156 | msgstr "Se déconnecter avec le bouton fermer du bureau." 157 | 158 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:6 159 | msgid "Get in sync with the window manager theme." 160 | msgstr "Se synchroniser avec le theme du gestionnaire de fenêtres." 161 | 162 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:7 163 | msgid "Button layout:" 164 | msgstr "Disposition des boutons :" 165 | 166 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:8 167 | msgid "" 168 | "Put the buttons id in the desired order.\n" 169 | "Example: [HMC]\n" 170 | "H=Hide, M=Maximize/unMaximize, C=Close" 171 | msgstr "" 172 | "Placer l'identifiant des boutons dans l'ordre choisi.\n" 173 | "Exemple : [HMC]\n" 174 | "H=Hide (minimiser), M=Maximize/unMaximize (maximiser/démaximiser), C=Close " 175 | "(fermer)." 176 | 177 | #: ../panel-plugin/buttons/wckbuttons.desktop.in.h:1 178 | msgid "Window Header - Buttons" 179 | msgstr "Entête des Fenêtres - Boutons" 180 | 181 | #: ../panel-plugin/buttons/wckbuttons.desktop.in.h:2 182 | msgid "Put the maximized window buttons on the panel." 183 | msgstr "Placer les boutons des fenêtres maximisées sur le tableau de bord." 184 | 185 | #~ msgid "Restart the plugin to apply changes on size mode." 186 | #~ msgstr "" 187 | #~ "Redémarrer le plugin pour appliquer les changements du mode de " 188 | #~ "dimensionnement." 189 | 190 | #~ msgid "Font" 191 | #~ msgstr "Police" 192 | 193 | #~ msgid "Font style:" 194 | #~ msgstr "Police :" 195 | 196 | #~ msgid "custom" 197 | #~ msgstr "personnalisée" 198 | -------------------------------------------------------------------------------- /po/it.po: -------------------------------------------------------------------------------- 1 | # Italian translations for xfce4-windowck-plugin package. 2 | # Copyright (C) 2013 THE xfce4-windowck-plugin'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the xfce4-windowck-plugin package. 4 | # Alessio , 2013. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: xfce4-windowck-plugin 0.1.1\n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2015-05-16 15:02+0200\n" 11 | "PO-Revision-Date: 2014-04-02 12:54+0100\n" 12 | "Last-Translator: Cédric Leporcq \n" 13 | "Language-Team: Italian\n" 14 | "Language: it\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 19 | "X-Generator: Poedit 1.6.4\n" 20 | 21 | #: ../panel-plugin/title/windowck-dialogs.c:493 22 | #: ../panel-plugin/buttons/wckbuttons-dialogs.c:378 23 | #, c-format 24 | msgid "Unable to open the following url: %s" 25 | msgstr "Impossibile aprire l'url: %s" 26 | 27 | #: ../panel-plugin/title/windowck-dialogs.glade.h:1 28 | msgid "at most" 29 | msgstr "al massimo" 30 | 31 | #: ../panel-plugin/title/windowck-dialogs.glade.h:2 32 | msgid "fixed to" 33 | msgstr "espandi" 34 | 35 | #: ../panel-plugin/title/windowck-dialogs.glade.h:3 36 | msgid "expand" 37 | msgstr "espandi" 38 | 39 | #: ../panel-plugin/title/windowck-dialogs.glade.h:4 40 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:1 41 | msgid "Control maximized windows." 42 | msgstr "Gestisci finestre massimizate." 43 | 44 | #: ../panel-plugin/title/windowck-dialogs.glade.h:5 45 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:2 46 | msgid "Control active windows." 47 | msgstr "Gestisci finestre attive." 48 | 49 | #: ../panel-plugin/title/windowck-dialogs.glade.h:6 50 | msgid "Show the plugin on desktop." 51 | msgstr "Mostra il plugin sul desktop." 52 | 53 | #: ../panel-plugin/title/windowck-dialogs.glade.h:7 54 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:5 55 | msgid "Behaviour" 56 | msgstr "Aspetto" 57 | 58 | #: ../panel-plugin/title/windowck-dialogs.glade.h:8 59 | msgid "Width:" 60 | msgstr "Larghezza:" 61 | 62 | #: ../panel-plugin/title/windowck-dialogs.glade.h:9 63 | msgid "chars" 64 | msgstr "caratteri" 65 | 66 | #: ../panel-plugin/title/windowck-dialogs.glade.h:10 67 | msgid "Padding:" 68 | msgstr "" 69 | 70 | #: ../panel-plugin/title/windowck-dialogs.glade.h:11 71 | msgid "pixels" 72 | msgstr "" 73 | 74 | #: ../panel-plugin/title/windowck-dialogs.glade.h:12 75 | msgid "Show the full title name" 76 | msgstr "" 77 | 78 | #: ../panel-plugin/title/windowck-dialogs.glade.h:13 79 | msgid "Display the title in two lines" 80 | msgstr "" 81 | 82 | #: ../panel-plugin/title/windowck-dialogs.glade.h:14 83 | msgid "Sync the font with the window manager." 84 | msgstr "" 85 | 86 | #: ../panel-plugin/title/windowck-dialogs.glade.h:15 87 | msgid "Subtitle font:" 88 | msgstr "" 89 | 90 | #: ../panel-plugin/title/windowck-dialogs.glade.h:16 91 | msgid "Title font:" 92 | msgstr "" 93 | 94 | #: ../panel-plugin/title/windowck-dialogs.glade.h:17 95 | msgid "Alignment:" 96 | msgstr "Allineamento:" 97 | 98 | #: ../panel-plugin/title/windowck-dialogs.glade.h:18 99 | msgid "Title" 100 | msgstr "" 101 | 102 | #: ../panel-plugin/title/windowck-dialogs.glade.h:19 103 | msgid "Show the window menu." 104 | msgstr "" 105 | 106 | #: ../panel-plugin/title/windowck-dialogs.glade.h:20 107 | msgid "Show the window Icon." 108 | msgstr "Mostra l'icona della finestra." 109 | 110 | #: ../panel-plugin/title/windowck-dialogs.glade.h:21 111 | #, fuzzy 112 | msgid "Place the menu icon on right." 113 | msgstr "Mostra l'icona sulla destra" 114 | 115 | #: ../panel-plugin/title/windowck-dialogs.glade.h:22 116 | msgid "Menu" 117 | msgstr "" 118 | 119 | #: ../panel-plugin/title/windowck-dialogs.glade.h:23 120 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:11 121 | msgid "Appearance" 122 | msgstr "Aspetto" 123 | 124 | #: ../panel-plugin/title/windowck-dialogs.glade.h:24 125 | msgid "left" 126 | msgstr "sinistra" 127 | 128 | #: ../panel-plugin/title/windowck-dialogs.glade.h:25 129 | msgid "center" 130 | msgstr "centro" 131 | 132 | #: ../panel-plugin/title/windowck-dialogs.glade.h:26 133 | msgid "right" 134 | msgstr "destra" 135 | 136 | #: ../panel-plugin/title/windowck-plugin.desktop.in.h:1 137 | msgid "Window Header - Title" 138 | msgstr "" 139 | 140 | #: ../panel-plugin/title/windowck-plugin.desktop.in.h:2 141 | msgid "Put the maximized window title on the panel." 142 | msgstr "Mostra il titolo della finestra massimizzata sul pannello." 143 | 144 | #: ../panel-plugin/buttons/wckbuttons-dialogs.c:314 145 | msgid "Directory" 146 | msgstr "" 147 | 148 | #: ../panel-plugin/buttons/wckbuttons-dialogs.c:316 149 | msgid "Themes usable" 150 | msgstr "" 151 | 152 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:3 153 | msgid "Show the buttons on desktop." 154 | msgstr "" 155 | 156 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:4 157 | msgid "Logout on close button desktop." 158 | msgstr "" 159 | 160 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:6 161 | msgid "Get in sync with the window manager theme." 162 | msgstr "" 163 | 164 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:7 165 | msgid "Button layout:" 166 | msgstr "" 167 | 168 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:8 169 | msgid "" 170 | "Put the buttons id in the desired order.\n" 171 | "Example: [HMC]\n" 172 | "H=Hide, M=Maximize/unMaximize, C=Close" 173 | msgstr "" 174 | 175 | #: ../panel-plugin/buttons/wckbuttons.desktop.in.h:1 176 | msgid "Window Header - Buttons" 177 | msgstr "" 178 | 179 | #: ../panel-plugin/buttons/wckbuttons.desktop.in.h:2 180 | msgid "Put the maximized window buttons on the panel." 181 | msgstr "" 182 | 183 | #~ msgid "Restart the plugin to apply changes on size mode." 184 | #~ msgstr "Riavviare l'plugin per applicare i cambiamenti." 185 | 186 | #~ msgid "Font style:" 187 | #~ msgstr "Stile carattere:" 188 | -------------------------------------------------------------------------------- /po/ru_RU.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: \n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2015-05-16 15:02+0200\n" 11 | "PO-Revision-Date: 2019-09-30 21:10+0300\n" 12 | "Language-Team: \n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: 8bit\n" 16 | "X-Generator: Poedit 2.2.1\n" 17 | "Last-Translator: https://github.com/zluca\n" 18 | "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n" 19 | "Language: ru_RU\n" 20 | 21 | #: ../panel-plugin/title/windowck-dialogs.c:493 22 | #: ../panel-plugin/buttons/wckbuttons-dialogs.c:378 23 | #, c-format 24 | msgid "Unable to open the following url: %s" 25 | msgstr "Невозможно открыть адрес: %s" 26 | 27 | #: ../panel-plugin/title/windowck-dialogs.glade.h:1 28 | msgid "at most" 29 | msgstr "не более чем" 30 | 31 | #: ../panel-plugin/title/windowck-dialogs.glade.h:2 32 | msgid "fixed to" 33 | msgstr "фиксировать к" 34 | 35 | #: ../panel-plugin/title/windowck-dialogs.glade.h:3 36 | msgid "expand" 37 | msgstr "расширить до" 38 | 39 | #: ../panel-plugin/title/windowck-dialogs.glade.h:4 40 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:1 41 | msgid "Control maximized windows." 42 | msgstr "Работать с развёрнутыми окнами." 43 | 44 | #: ../panel-plugin/title/windowck-dialogs.glade.h:5 45 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:2 46 | msgid "Control active windows." 47 | msgstr "Работать с активными окнами." 48 | 49 | #: ../panel-plugin/title/windowck-dialogs.glade.h:6 50 | msgid "Show the plugin on desktop." 51 | msgstr "Показать плагин на рабочем столе." 52 | 53 | #: ../panel-plugin/title/windowck-dialogs.glade.h:7 54 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:5 55 | msgid "Behaviour" 56 | msgstr "Поведение" 57 | 58 | #: ../panel-plugin/title/windowck-dialogs.glade.h:8 59 | msgid "Width:" 60 | msgstr "Ширина:" 61 | 62 | #: ../panel-plugin/title/windowck-dialogs.glade.h:9 63 | msgid "chars" 64 | msgstr "символов" 65 | 66 | #: ../panel-plugin/title/windowck-dialogs.glade.h:10 67 | msgid "Padding:" 68 | msgstr "Отступ:" 69 | 70 | #: ../panel-plugin/title/windowck-dialogs.glade.h:11 71 | msgid "pixels" 72 | msgstr "пикселов" 73 | 74 | #: ../panel-plugin/title/windowck-dialogs.glade.h:12 75 | msgid "Show the full title name" 76 | msgstr "Показывать полный заголовок" 77 | 78 | #: ../panel-plugin/title/windowck-dialogs.glade.h:13 79 | msgid "Display the title in two lines" 80 | msgstr "Показывать заголовок в две линии" 81 | 82 | #: ../panel-plugin/title/windowck-dialogs.glade.h:14 83 | msgid "Sync the font with the window manager." 84 | msgstr "Использовать системный шрифт." 85 | 86 | #: ../panel-plugin/title/windowck-dialogs.glade.h:15 87 | msgid "Subtitle font:" 88 | msgstr "Шрифт субтитров:" 89 | 90 | #: ../panel-plugin/title/windowck-dialogs.glade.h:16 91 | msgid "Title font:" 92 | msgstr "Шрифт заголовка:" 93 | 94 | #: ../panel-plugin/title/windowck-dialogs.glade.h:17 95 | msgid "Alignment:" 96 | msgstr "Выравнивание:" 97 | 98 | #: ../panel-plugin/title/windowck-dialogs.glade.h:18 99 | msgid "Title" 100 | msgstr "Заголовок" 101 | 102 | #: ../panel-plugin/title/windowck-dialogs.glade.h:19 103 | msgid "Show the window menu." 104 | msgstr "Показать меню окна." 105 | 106 | #: ../panel-plugin/title/windowck-dialogs.glade.h:20 107 | msgid "Show the window Icon." 108 | msgstr "Показать иконку окна." 109 | 110 | #: ../panel-plugin/title/windowck-dialogs.glade.h:21 111 | msgid "Place the menu icon on right." 112 | msgstr "Поместить иконку окна справа." 113 | 114 | #: ../panel-plugin/title/windowck-dialogs.glade.h:22 115 | msgid "Menu" 116 | msgstr "Меню" 117 | 118 | #: ../panel-plugin/title/windowck-dialogs.glade.h:23 119 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:11 120 | msgid "Appearance" 121 | msgstr "Внешний вид" 122 | 123 | #: ../panel-plugin/title/windowck-dialogs.glade.h:24 124 | msgid "left" 125 | msgstr "слева" 126 | 127 | #: ../panel-plugin/title/windowck-dialogs.glade.h:25 128 | msgid "center" 129 | msgstr "по центру" 130 | 131 | #: ../panel-plugin/title/windowck-dialogs.glade.h:26 132 | msgid "right" 133 | msgstr "справа" 134 | 135 | #: ../panel-plugin/title/windowck-plugin.desktop.in.h:1 136 | msgid "Window Header - Title" 137 | msgstr "Шапка окна - Заголовок" 138 | 139 | #: ../panel-plugin/title/windowck-plugin.desktop.in.h:2 140 | msgid "Put the maximized window title on the panel." 141 | msgstr "Поместить заголовок развёрнутого окна на панель." 142 | 143 | #: ../panel-plugin/buttons/wckbuttons-dialogs.c:314 144 | msgid "Directory" 145 | msgstr "Директория" 146 | 147 | #: ../panel-plugin/buttons/wckbuttons-dialogs.c:316 148 | msgid "Themes usable" 149 | msgstr "Доступные темы" 150 | 151 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:3 152 | msgid "Show the buttons on desktop." 153 | msgstr "Показать кнопки на рабочем столе." 154 | 155 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:4 156 | msgid "Logout on close button desktop." 157 | msgstr "Выйти при закрытии кнопок на рабочем столе." 158 | 159 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:6 160 | msgid "Get in sync with the window manager theme." 161 | msgstr "Синхронизироваться с системной темой." 162 | 163 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:7 164 | msgid "Button layout:" 165 | msgstr "Расположение кнопок:" 166 | 167 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:8 168 | msgid "" 169 | "Put the buttons id in the desired order.\n" 170 | "Example: [HMC]\n" 171 | "H=Hide, M=Maximize/unMaximize, C=Close" 172 | msgstr "" 173 | "Разместите id кнопок в желаемом порядке.\n" 174 | "Например: [HMC]\n" 175 | "H=Скрыть, M=Свернуть/Развернуть, C=закрыть" 176 | 177 | #: ../panel-plugin/buttons/wckbuttons.desktop.in.h:1 178 | msgid "Window Header - Buttons" 179 | msgstr "Шапка окна - кнопки" 180 | 181 | #: ../panel-plugin/buttons/wckbuttons.desktop.in.h:2 182 | msgid "Put the maximized window buttons on the panel." 183 | msgstr "Поместить кнопки развёрнутого окна на панель." 184 | -------------------------------------------------------------------------------- /po/tr.po: -------------------------------------------------------------------------------- 1 | # Turkish translations for xfce4-windowck-plugin package. 2 | # Copyright (C) 2013 THE xfce4-windowck-plugin'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the xfce4-windowck-plugin package. 4 | # Yaşar Çiv , 2017. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: 0.1.1\n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2017-09-11 21:18+0200\n" 11 | "PO-Revision-Date: 2017-09-11 21:18+0100\n" 12 | "Last-Translator: Yaşar Çiv \n" 13 | "Language-Team: Turkish\n" 14 | "Language: tr\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "X-Generator: Poedit 1.7.4\n" 19 | 20 | #: ../panel-plugin/title/windowck-dialogs.c:493 21 | #: ../panel-plugin/buttons/wckbuttons-dialogs.c:378 22 | #, c-format 23 | msgid "Unable to open the following url: %s" 24 | msgstr "Aşağıdaki URL açılamıyor: %s" 25 | 26 | #: ../panel-plugin/title/windowck-dialogs.glade.h:1 27 | msgid "at most" 28 | msgstr "en fazla" 29 | 30 | #: ../panel-plugin/title/windowck-dialogs.glade.h:2 31 | msgid "fixed to" 32 | msgstr "sabit" 33 | 34 | #: ../panel-plugin/title/windowck-dialogs.glade.h:3 35 | msgid "expand" 36 | msgstr "genişlet" 37 | 38 | #: ../panel-plugin/title/windowck-dialogs.glade.h:4 39 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:1 40 | msgid "Control maximized windows." 41 | msgstr "Büyütülmüş pencereleri kontrol et." 42 | 43 | #: ../panel-plugin/title/windowck-dialogs.glade.h:5 44 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:2 45 | msgid "Control active windows." 46 | msgstr "Etkin pencereleri kontrol et." 47 | 48 | #: ../panel-plugin/title/windowck-dialogs.glade.h:6 49 | msgid "Show the plugin on desktop." 50 | msgstr "Eklentiyi masaüstünde göster." 51 | 52 | #: ../panel-plugin/title/windowck-dialogs.glade.h:7 53 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:5 54 | msgid "Behaviour" 55 | msgstr "Davranış" 56 | 57 | #: ../panel-plugin/title/windowck-dialogs.glade.h:8 58 | msgid "Width:" 59 | msgstr "Genişlik:" 60 | 61 | #: ../panel-plugin/title/windowck-dialogs.glade.h:9 62 | msgid "chars" 63 | msgstr "karakter" 64 | 65 | #: ../panel-plugin/title/windowck-dialogs.glade.h:10 66 | msgid "Padding:" 67 | msgstr "Dolgu:" 68 | 69 | #: ../panel-plugin/title/windowck-dialogs.glade.h:11 70 | msgid "pixels" 71 | msgstr "piksel" 72 | 73 | #: ../panel-plugin/title/windowck-dialogs.glade.h:12 74 | msgid "Show the full title name" 75 | msgstr "Tam başlık adını göster." 76 | 77 | #: ../panel-plugin/title/windowck-dialogs.glade.h:13 78 | msgid "Display the title in two lines" 79 | msgstr "Başlıkları iki satırda görüntüle" 80 | 81 | #: ../panel-plugin/title/windowck-dialogs.glade.h:14 82 | msgid "Sync the font with the window manager." 83 | msgstr "Yazı tipini pencere yöneticisi ile senkronize et." 84 | 85 | #: ../panel-plugin/title/windowck-dialogs.glade.h:15 86 | msgid "Subtitle font:" 87 | msgstr "Altyazı yazı tipi:" 88 | 89 | #: ../panel-plugin/title/windowck-dialogs.glade.h:16 90 | msgid "Title font:" 91 | msgstr "Başlık yazı tipi:" 92 | 93 | #: ../panel-plugin/title/windowck-dialogs.glade.h:17 94 | msgid "Alignment:" 95 | msgstr "Hizalama:" 96 | 97 | #: ../panel-plugin/title/windowck-dialogs.glade.h:18 98 | msgid "Title" 99 | msgstr "Başlık" 100 | 101 | #: ../panel-plugin/title/windowck-dialogs.glade.h:19 102 | msgid "Show the window menu." 103 | msgstr "Pencere menüsünü göster." 104 | 105 | #: ../panel-plugin/title/windowck-dialogs.glade.h:20 106 | msgid "Show the window Icon." 107 | msgstr "Pencere simgelerini göster." 108 | 109 | #: ../panel-plugin/title/windowck-dialogs.glade.h:21 110 | msgid "Place the menu icon on right." 111 | msgstr "Menü simgesini sağ tarafa yerleştir." 112 | 113 | #: ../panel-plugin/title/windowck-dialogs.glade.h:22 114 | msgid "Menu" 115 | msgstr "Menü" 116 | 117 | #: ../panel-plugin/title/windowck-dialogs.glade.h:23 118 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:11 119 | msgid "Appearance" 120 | msgstr "Görünüm" 121 | 122 | #: ../panel-plugin/title/windowck-dialogs.glade.h:24 123 | msgid "left" 124 | msgstr "sol" 125 | 126 | #: ../panel-plugin/title/windowck-dialogs.glade.h:25 127 | msgid "center" 128 | msgstr "merkez" 129 | 130 | #: ../panel-plugin/title/windowck-dialogs.glade.h:26 131 | msgid "right" 132 | msgstr "sağ" 133 | 134 | #: ../panel-plugin/title/windowck-plugin.desktop.in.h:1 135 | msgid "Window Header - Title" 136 | msgstr "Pencere Başlığı - Başlık" 137 | 138 | #: ../panel-plugin/title/windowck-plugin.desktop.in.h:2 139 | msgid "Put the maximized window title on the panel." 140 | msgstr "Büyütülmüş pencere başlığını panele koy." 141 | 142 | #: ../panel-plugin/buttons/wckbuttons-dialogs.c:314 143 | msgid "Directory" 144 | msgstr "Dizin" 145 | 146 | #: ../panel-plugin/buttons/wckbuttons-dialogs.c:316 147 | msgid "Themes usable" 148 | msgstr "Kullanılabilir temalar" 149 | 150 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:3 151 | msgid "Show the buttons on desktop." 152 | msgstr "Düğmeleri masaüstünde göster." 153 | 154 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:4 155 | msgid "Logout on close button desktop." 156 | msgstr "Masaüstünde kapat düğmesinden çıkış yap" 157 | 158 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:6 159 | msgid "Get in sync with the window manager theme." 160 | msgstr "Pencere yöneticisi temasıyla senkronize ol." 161 | 162 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:7 163 | msgid "Button layout:" 164 | msgstr "Düğme düzeni:" 165 | 166 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:8 167 | msgid "" 168 | "Put the buttons id in the desired order.\n" 169 | "Example: [HMC]\n" 170 | "H=Hide, M=Maximize/unMaximize, C=Close" 171 | msgstr "" 172 | "Düğmeleri istenen sıraya koyun.\n" 173 | "Örnek: [HMC]\n" 174 | "H=Küçült, M=Büyüt/Büyütmeyi geri al, C=Kapat " 175 | 176 | #: ../panel-plugin/buttons/wckbuttons.desktop.in.h:1 177 | msgid "Window Header - Buttons" 178 | msgstr "Pencere Başlığı - Düğmeler" 179 | 180 | #: ../panel-plugin/buttons/wckbuttons.desktop.in.h:2 181 | msgid "Put the maximized window buttons on the panel." 182 | msgstr "Büyütülmüş pencere düğmelerini panele koy" 183 | 184 | #~ msgid "Restart the plugin to apply changes on size mode." 185 | #~ msgstr "Boyut modunda değişiklikleri uygulamak için eklentiyi yeniden başlatın." 186 | 187 | #~ msgid "Font" 188 | #~ msgstr "Yazı tipi" 189 | 190 | #~ msgid "Font style:" 191 | #~ msgstr "Yazı tipi tarzı:" 192 | 193 | #~ msgid "custom" 194 | #~ msgstr "geleneksel" 195 | -------------------------------------------------------------------------------- /po/xfce4-windowck-plugin.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: PACKAGE VERSION\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2015-05-16 15:02+0200\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=CHARSET\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | 20 | #: ../panel-plugin/title/windowck-dialogs.c:493 21 | #: ../panel-plugin/buttons/wckbuttons-dialogs.c:378 22 | #, c-format 23 | msgid "Unable to open the following url: %s" 24 | msgstr "" 25 | 26 | #: ../panel-plugin/title/windowck-dialogs.glade.h:1 27 | msgid "at most" 28 | msgstr "" 29 | 30 | #: ../panel-plugin/title/windowck-dialogs.glade.h:2 31 | msgid "fixed to" 32 | msgstr "" 33 | 34 | #: ../panel-plugin/title/windowck-dialogs.glade.h:3 35 | msgid "expand" 36 | msgstr "" 37 | 38 | #: ../panel-plugin/title/windowck-dialogs.glade.h:4 39 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:1 40 | msgid "Control maximized windows." 41 | msgstr "" 42 | 43 | #: ../panel-plugin/title/windowck-dialogs.glade.h:5 44 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:2 45 | msgid "Control active windows." 46 | msgstr "" 47 | 48 | #: ../panel-plugin/title/windowck-dialogs.glade.h:6 49 | msgid "Show the plugin on desktop." 50 | msgstr "" 51 | 52 | #: ../panel-plugin/title/windowck-dialogs.glade.h:7 53 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:5 54 | msgid "Behaviour" 55 | msgstr "" 56 | 57 | #: ../panel-plugin/title/windowck-dialogs.glade.h:8 58 | msgid "Width:" 59 | msgstr "" 60 | 61 | #: ../panel-plugin/title/windowck-dialogs.glade.h:9 62 | msgid "chars" 63 | msgstr "" 64 | 65 | #: ../panel-plugin/title/windowck-dialogs.glade.h:10 66 | msgid "Padding:" 67 | msgstr "" 68 | 69 | #: ../panel-plugin/title/windowck-dialogs.glade.h:11 70 | msgid "pixels" 71 | msgstr "" 72 | 73 | #: ../panel-plugin/title/windowck-dialogs.glade.h:12 74 | msgid "Show the full title name" 75 | msgstr "" 76 | 77 | #: ../panel-plugin/title/windowck-dialogs.glade.h:13 78 | msgid "Display the title in two lines" 79 | msgstr "" 80 | 81 | #: ../panel-plugin/title/windowck-dialogs.glade.h:14 82 | msgid "Sync the font with the window manager." 83 | msgstr "" 84 | 85 | #: ../panel-plugin/title/windowck-dialogs.glade.h:15 86 | msgid "Subtitle font:" 87 | msgstr "" 88 | 89 | #: ../panel-plugin/title/windowck-dialogs.glade.h:16 90 | msgid "Title font:" 91 | msgstr "" 92 | 93 | #: ../panel-plugin/title/windowck-dialogs.glade.h:17 94 | msgid "Alignment:" 95 | msgstr "" 96 | 97 | #: ../panel-plugin/title/windowck-dialogs.glade.h:18 98 | msgid "Title" 99 | msgstr "" 100 | 101 | #: ../panel-plugin/title/windowck-dialogs.glade.h:19 102 | msgid "Show the window menu." 103 | msgstr "" 104 | 105 | #: ../panel-plugin/title/windowck-dialogs.glade.h:20 106 | msgid "Show the window Icon." 107 | msgstr "" 108 | 109 | #: ../panel-plugin/title/windowck-dialogs.glade.h:21 110 | msgid "Place the menu icon on right." 111 | msgstr "" 112 | 113 | #: ../panel-plugin/title/windowck-dialogs.glade.h:22 114 | msgid "Menu" 115 | msgstr "" 116 | 117 | #: ../panel-plugin/title/windowck-dialogs.glade.h:23 118 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:11 119 | msgid "Appearance" 120 | msgstr "" 121 | 122 | #: ../panel-plugin/title/windowck-dialogs.glade.h:24 123 | msgid "left" 124 | msgstr "" 125 | 126 | #: ../panel-plugin/title/windowck-dialogs.glade.h:25 127 | msgid "center" 128 | msgstr "" 129 | 130 | #: ../panel-plugin/title/windowck-dialogs.glade.h:26 131 | msgid "right" 132 | msgstr "" 133 | 134 | #: ../panel-plugin/title/windowck-plugin.desktop.in.h:1 135 | msgid "Window Header - Title" 136 | msgstr "" 137 | 138 | #: ../panel-plugin/title/windowck-plugin.desktop.in.h:2 139 | msgid "Put the maximized window title on the panel." 140 | msgstr "" 141 | 142 | #: ../panel-plugin/buttons/wckbuttons-dialogs.c:314 143 | msgid "Directory" 144 | msgstr "" 145 | 146 | #: ../panel-plugin/buttons/wckbuttons-dialogs.c:316 147 | msgid "Themes usable" 148 | msgstr "" 149 | 150 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:3 151 | msgid "Show the buttons on desktop." 152 | msgstr "" 153 | 154 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:4 155 | msgid "Logout on close button desktop." 156 | msgstr "" 157 | 158 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:6 159 | msgid "Get in sync with the window manager theme." 160 | msgstr "" 161 | 162 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:7 163 | msgid "Button layout:" 164 | msgstr "" 165 | 166 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:8 167 | msgid "" 168 | "Put the buttons id in the desired order.\n" 169 | "Example: [HMC]\n" 170 | "H=Hide, M=Maximize/unMaximize, C=Close" 171 | msgstr "" 172 | 173 | #: ../panel-plugin/buttons/wckbuttons.desktop.in.h:1 174 | msgid "Window Header - Buttons" 175 | msgstr "" 176 | 177 | #: ../panel-plugin/buttons/wckbuttons.desktop.in.h:2 178 | msgid "Put the maximized window buttons on the panel." 179 | msgstr "" 180 | -------------------------------------------------------------------------------- /po/zh_CN.po: -------------------------------------------------------------------------------- 1 | # Simplified Chinese translations for xfce4-windowck-plugin package. 2 | # Copyright (C) 2013 THE xfce4-windowck-plugin'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the xfce4-windowck-plugin package. 4 | # 褚 东宇 , 2018. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: 0.1.1\n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2018-06-02 16:08+0800\n" 11 | "PO-Revision-Date: 2018-06-02 16:08+0800\n" 12 | "Last-Translator: Dylan Chu\n" 13 | "Language-Team: Chinese\n" 14 | "Language: zh_CN\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "X-Generator: Poedit 1.7.4\n" 19 | 20 | #: ../panel-plugin/title/windowck-dialogs.c:493 21 | #: ../panel-plugin/buttons/wckbuttons-dialogs.c:378 22 | #, c-format 23 | msgid "Unable to open the following url: %s" 24 | msgstr "不能打开这个url: %s" 25 | 26 | #: ../panel-plugin/title/windowck-dialogs.glade.h:1 27 | msgid "at most" 28 | msgstr "最大" 29 | 30 | #: ../panel-plugin/title/windowck-dialogs.glade.h:2 31 | msgid "fixed to" 32 | msgstr "固定为" 33 | 34 | #: ../panel-plugin/title/windowck-dialogs.glade.h:3 35 | msgid "expand" 36 | msgstr "扩展" 37 | 38 | #: ../panel-plugin/title/windowck-dialogs.glade.h:4 39 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:1 40 | msgid "Control maximized windows." 41 | msgstr "控制最大化的窗口" 42 | 43 | #: ../panel-plugin/title/windowck-dialogs.glade.h:5 44 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:2 45 | msgid "Control active windows." 46 | msgstr "控制活动窗口" 47 | 48 | #: ../panel-plugin/title/windowck-dialogs.glade.h:6 49 | msgid "Show the plugin on desktop." 50 | msgstr "在桌面时也显示" 51 | 52 | #: ../panel-plugin/title/windowck-dialogs.glade.h:7 53 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:5 54 | msgid "Behaviour" 55 | msgstr "行为" 56 | 57 | #: ../panel-plugin/title/windowck-dialogs.glade.h:8 58 | msgid "Width:" 59 | msgstr "宽度:" 60 | 61 | #: ../panel-plugin/title/windowck-dialogs.glade.h:9 62 | msgid "chars" 63 | msgstr "字符" 64 | 65 | #: ../panel-plugin/title/windowck-dialogs.glade.h:10 66 | msgid "Padding:" 67 | msgstr "边距:" 68 | 69 | #: ../panel-plugin/title/windowck-dialogs.glade.h:11 70 | msgid "pixels" 71 | msgstr "像素" 72 | 73 | #: ../panel-plugin/title/windowck-dialogs.glade.h:12 74 | msgid "Show the full title name" 75 | msgstr "显示整个标题" 76 | 77 | #: ../panel-plugin/title/windowck-dialogs.glade.h:13 78 | msgid "Display the title in two lines" 79 | msgstr "用两行显示标题" 80 | 81 | #: ../panel-plugin/title/windowck-dialogs.glade.h:14 82 | msgid "Sync the font with the window manager." 83 | msgstr "和窗口管理器同步字体" 84 | 85 | #: ../panel-plugin/title/windowck-dialogs.glade.h:15 86 | msgid "Subtitle font:" 87 | msgstr "子标题字体:" 88 | 89 | #: ../panel-plugin/title/windowck-dialogs.glade.h:16 90 | msgid "Title font:" 91 | msgstr "标题字体:" 92 | 93 | #: ../panel-plugin/title/windowck-dialogs.glade.h:17 94 | msgid "Alignment:" 95 | msgstr "对齐:" 96 | 97 | #: ../panel-plugin/title/windowck-dialogs.glade.h:18 98 | msgid "Title" 99 | msgstr "标题" 100 | 101 | #: ../panel-plugin/title/windowck-dialogs.glade.h:19 102 | msgid "Show the window menu." 103 | msgstr "显示窗口菜单" 104 | 105 | #: ../panel-plugin/title/windowck-dialogs.glade.h:20 106 | msgid "Show the window Icon." 107 | msgstr "显示窗口图标" 108 | 109 | #: ../panel-plugin/title/windowck-dialogs.glade.h:21 110 | msgid "Place the menu icon on right." 111 | msgstr "把菜单图标放在右侧" 112 | 113 | #: ../panel-plugin/title/windowck-dialogs.glade.h:22 114 | msgid "Menu" 115 | msgstr "菜单" 116 | 117 | #: ../panel-plugin/title/windowck-dialogs.glade.h:23 118 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:11 119 | msgid "Appearance" 120 | msgstr "外观" 121 | 122 | #: ../panel-plugin/title/windowck-dialogs.glade.h:24 123 | msgid "left" 124 | msgstr "左侧" 125 | 126 | #: ../panel-plugin/title/windowck-dialogs.glade.h:25 127 | msgid "center" 128 | msgstr "中间" 129 | 130 | #: ../panel-plugin/title/windowck-dialogs.glade.h:26 131 | msgid "right" 132 | msgstr "右侧" 133 | 134 | #: ../panel-plugin/title/windowck-plugin.desktop.in.h:1 135 | msgid "Window Header - Title" 136 | msgstr "Window Header - 标题" 137 | 138 | #: ../panel-plugin/title/windowck-plugin.desktop.in.h:2 139 | msgid "Put the maximized window title on the panel." 140 | msgstr "把最大化窗口的标题放在panel上" 141 | 142 | #: ../panel-plugin/buttons/wckbuttons-dialogs.c:314 143 | msgid "Directory" 144 | msgstr "目录" 145 | 146 | #: ../panel-plugin/buttons/wckbuttons-dialogs.c:316 147 | msgid "Themes usable" 148 | msgstr "可用主题" 149 | 150 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:3 151 | msgid "Show the buttons on desktop." 152 | msgstr "在桌面时也显示按钮" 153 | 154 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:4 155 | msgid "Logout on close button desktop." 156 | msgstr "在关闭桌面按钮时注销" 157 | 158 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:6 159 | msgid "Get in sync with the window manager theme." 160 | msgstr "和窗口管理器主题同步" 161 | 162 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:7 163 | msgid "Button layout:" 164 | msgstr "按钮顺序(HMC):" 165 | 166 | #: ../panel-plugin/buttons/wckbuttons-dialogs.glade.h:8 167 | msgid "" 168 | "Put the buttons id in the desired order.\n" 169 | "Example: [HMC]\n" 170 | "H=Hide, M=Maximize/unMaximize, C=Close" 171 | msgstr "" 172 | "自定义按钮顺序\n" 173 | "例如: [HMC]\n" 174 | "H=最小化, M=最大化/恢复, C=关闭" 175 | 176 | #: ../panel-plugin/buttons/wckbuttons.desktop.in.h:1 177 | msgid "Window Header - Buttons" 178 | msgstr "Window Header - 按钮" 179 | 180 | #: ../panel-plugin/buttons/wckbuttons.desktop.in.h:2 181 | msgid "Put the maximized window buttons on the panel." 182 | msgstr "把最大化窗口的控制按钮放在panel上" 183 | 184 | #~ msgid "Restart the plugin to apply changes on size mode." 185 | #~ msgstr "重启插件以应用大小样式" 186 | 187 | #~ msgid "Font" 188 | #~ msgstr "字体" 189 | 190 | #~ msgid "Font style:" 191 | #~ msgstr "字体样式:" 192 | 193 | #~ msgid "custom" 194 | #~ msgstr "自定义" 195 | -------------------------------------------------------------------------------- /reloadPlugins.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | for i in windowck wckbuttons 4 | do 5 | process=$(ps -ef | grep ${i} | grep -v grep | awk '{ print $2}') 6 | 7 | if [[ -n ${process} ]] 8 | then 9 | kill ${process} 10 | fi 11 | done 12 | -------------------------------------------------------------------------------- /themes/Makefile.am: -------------------------------------------------------------------------------- 1 | # themes/Makefile.am 2 | # 3 | 4 | SUBDIRS = windowck windowck-dark 5 | -------------------------------------------------------------------------------- /themes/windowck-dark/Makefile.am: -------------------------------------------------------------------------------- 1 | # themes/Makefile.am 2 | # 3 | 4 | SUBDIRS = xfwm4 unity 5 | -------------------------------------------------------------------------------- /themes/windowck-dark/unity/Makefile.am: -------------------------------------------------------------------------------- 1 | themedir = $(datadir)/themes/Windowck-dark/unity 2 | 3 | all: generate all-am 4 | 5 | generate: 6 | echo -e "Going to convert xpm to png files"; \ 7 | ./generator.py; 8 | 9 | install-data: install-data-local 10 | 11 | install-data-local: 12 | echo -e "Going to copy files for $$size"; \ 13 | for file in `find . -name "*.png"`; do \ 14 | $(mkdir_p) $(DESTDIR)$(themedir); \ 15 | $(install_sh_DATA) $$file $(DESTDIR)$(themedir); \ 16 | done; 17 | 18 | clean: clean-data-local clean-am 19 | 20 | clean-data-local: 21 | echo -e "Going to clean png files"; \ 22 | rm -f *.png *.xpm; 23 | 24 | uninstall-local: uninstall-am 25 | -------------------------------------------------------------------------------- /themes/windowck-dark/unity/generator.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | ''' 3 | simple-gtk xpm generator 4 | 5 | Copyright (C) 2012 Felipe A. Hernandez 6 | Portions adapted by Cedric Leporcq. 7 | 8 | This program is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with this program. If not, see . 20 | 21 | ''' 22 | import os 23 | from os import linesep 24 | 25 | 26 | def gendeg2(color1, color2, steps): 27 | ''' Generates a list of colors being a gradient from color1 to color2 on 28 | given steps number. ''' 29 | def fix(c): 30 | if c < 0: return 0 31 | elif c > 255: return 255 32 | return int(round(c)) 33 | a = [0]*steps 34 | c1 = (int(color1[1:3],16),int(color1[3:5],16),int(color1[5:7],16)) 35 | c2 = (int(color2[1:3],16),int(color2[3:5],16),int(color2[5:7],16)) 36 | ci = (float(c2[0]-c1[0])/(steps+1),float(c2[1]-c1[1])/(steps+1),float(c2[2]-c1[2])/(steps+1)) 37 | tr = [c1] 38 | for i in range(steps): 39 | tr.append((fix(tr[-1][0]+ci[0]),fix(tr[-1][1]+ci[1]),fix(tr[-1][2]+ci[2]))) 40 | tr.append(c2) 41 | return [("#%2s%2s%2s" % (hex(i[0])[2:],hex(i[1])[2:],hex(i[2])[2:])).replace(" ", "0") for i in tr] 42 | 43 | def gendeg3(color1, color2, color3, steps): 44 | ''' Generates a list of colors being a gradient from color1 to color3, with 45 | color2 at middle, with given steps number between each color. ''' 46 | return gendeg(color1,color2,steps)[:-1]+gendeg(color2,color3,steps) 47 | 48 | def gendeg(*args): 49 | ''' Interface between gendeg2 or gendeg3 depending on arg number ''' 50 | if len(args) == 3: return gendeg2(*args) 51 | elif len(args) == 4: return gendeg3(*args) 52 | raise NotImplemented("Bad arguments, see gendeg2 and gendeg3 documentation.") 53 | 54 | def genmap(dmap, chars, *gendeg_args): 55 | ''' 56 | 57 | ''' 58 | r = dict(zip(chars,gendeg(*gendeg_args))) 59 | r.update(dmap) 60 | return r 61 | 62 | def generate(name, txt, dic, x0=0, y0=0, w=None, h=None): 63 | ''' Creates xpm file with given name, given draw as string, colors as dict. 64 | Extra args are for generate parts of xpm. 65 | ''' 66 | if w is None: 67 | w = len(txt.split("\n")[0]) 68 | if h is None: 69 | h = len(txt.split("\n")) 70 | x1 = x0 + w 71 | y1 = y0 + h 72 | colors = {} 73 | lines = [i[x0:x1] for i in txt.split("\n")[y0:y1]] 74 | for i in lines: 75 | for j in i: 76 | if j not in colors: 77 | colors[j] = dic[j] 78 | xpmlines = [ 79 | "/* XPM */", 80 | "static char * %s = {" % name.replace("-", "_"), 81 | "\"%d %d %d 1\", " % (w, h, len(colors)) 82 | ] 83 | xpmlines.extend( 84 | "\"%s\tc %s\", " % i for i in list(colors.items()) 85 | ) 86 | xpmlines.extend( 87 | "\"%s\", " % i for i in lines 88 | ) 89 | xpmlines.append( 90 | "};" 91 | ) 92 | with open("%s.xpm" % name,"w") as f: f.write(linesep.join(xpmlines)) 93 | 94 | def holePos(txt): 95 | ''' Detects a hole on a xpm string, used to find border sizes.''' 96 | lines = txt.split("\n") 97 | for i in range(len(lines)): 98 | if " " in lines[i]: 99 | return (lines[i].find(" "),i) 100 | raise ValueError 101 | 102 | def holeSize(txt): 103 | ''' Detects hole on a xpm string, used to find border sizes.''' 104 | lastwidth = 0 105 | inhole = 0 106 | for line in txt.split("\n"): 107 | if " " in line: 108 | lastwidth = line.count(" ") 109 | inhole += 1 110 | elif inhole > 0: 111 | return (lastwidth, inhole) 112 | raise ValueError 113 | 114 | def build(): 115 | gvar = globals() 116 | for i in ("close", "maximize", "minimize", "menu", "unmaximize"): 117 | for j in ("focused_normal", "focused_prelight", "focused_pressed", "unfocused"): 118 | name = "%s_%s" % (i,j) 119 | if name in gvar: 120 | generate(name, gvar[name], gvar["%s_map" % name]) 121 | os.system("convert %s.xpm %s.png" % (name,name)) 122 | os.system("cp %s_focused_normal.png %s.png" % (i,i)) 123 | 124 | #close 125 | close_focused_normal = ''' 126 | .................. 127 | .................. 128 | ================== 129 | =====@@====@@===== 130 | ====@++@==@++@==== 131 | ====@+++@@+++@==== 132 | =====@++++++@===== 133 | ======@++++@====== 134 | ======@++++@====== 135 | =====@++++++@===== 136 | ====@+++@@+++@==== 137 | ====@++@==@++@==== 138 | =====@@====@@===== 139 | ================== 140 | '''.strip() 141 | 142 | chars = ["+", "@", "#", "=", "-"] 143 | dmap = [(".", "None")] 144 | close_focused_normal_map = { 145 | "." : "None", 146 | "=" : "None", 147 | "+" : "#E6E6E6", 148 | "@" : "None", 149 | "#" : "None", 150 | } 151 | 152 | close_focused_prelight = close_focused_normal 153 | close_focused_prelight_map = { 154 | "." : "None", 155 | "=" : "None", 156 | "+" : "#D92626", 157 | "@" : "#000000", 158 | "#" : "None", 159 | } 160 | 161 | close_focused_pressed = close_focused_normal 162 | close_focused_pressed_map = { 163 | "." : "None", 164 | "=" : "None", 165 | "+" : "#D92626", 166 | "@" : "None", 167 | "#" : "#000000", 168 | } 169 | 170 | close_unfocused = close_focused_normal 171 | close_unfocused_map = { 172 | "." : "None", 173 | "=" : "None", 174 | "+" : "#A1A1A1", 175 | "@" : "None", 176 | "#" : "#000000", 177 | } 178 | 179 | #hide 180 | minimize_focused_normal = ''' 181 | .................. 182 | .................. 183 | ================== 184 | ================== 185 | ================== 186 | ================== 187 | ================== 188 | ================== 189 | ================== 190 | ===@@@@@@@@@@@@=== 191 | ===@++++++++++@=== 192 | ===@++++++++++@=== 193 | ===@@@@@@@@@@@@=== 194 | ================== 195 | '''.strip() 196 | minimize_focused_normal_map = close_focused_normal_map 197 | minimize_focused_prelight = minimize_focused_normal 198 | minimize_focused_prelight_map = { 199 | "." : "None", 200 | "=" : "None", 201 | "+" : "#FFFFFF", 202 | "@" : "#000000", 203 | "#" : "None", 204 | } 205 | 206 | minimize_focused_pressed = minimize_focused_normal 207 | minimize_focused_pressed_map = { 208 | "." : "None", 209 | "=" : "None", 210 | "+" : "#FFFFFF", 211 | "@" : "None", 212 | "#" : "None", 213 | } 214 | 215 | minimize_unfocused = minimize_focused_normal 216 | minimize_unfocused_map = close_unfocused_map 217 | 218 | #maximize 219 | maximize_focused_normal = ''' 220 | .................. 221 | .................. 222 | ===@@@@@@@@@@@@=== 223 | ===@++++++++++@=== 224 | ===@++++++++++@=== 225 | ===@+@@@@@@@@+@=== 226 | ===@+@======@+@=== 227 | ===@+@======@+@=== 228 | ===@+@======@+@=== 229 | ===@+@======@+@=== 230 | ===@+@@@@@@@@+@=== 231 | ===@++++++++++@=== 232 | ===@@@@@@@@@@@@=== 233 | ================== 234 | '''.strip() 235 | maximize_focused_normal_map = close_focused_normal_map 236 | maximize_focused_prelight = maximize_focused_normal 237 | maximize_focused_prelight_map = minimize_focused_prelight_map 238 | maximize_focused_pressed = maximize_focused_normal 239 | maximize_focused_pressed_map = minimize_focused_pressed_map 240 | maximize_unfocused = maximize_focused_normal 241 | maximize_unfocused_map = close_unfocused_map 242 | 243 | #maximize-toggled 244 | unmaximize_focused_normal = ''' 245 | .................. 246 | .................. 247 | ================== 248 | ================== 249 | ====@@@@@@@@@@==== 250 | ====@++++++++@==== 251 | ====@++++++++@==== 252 | ====@+@@@@@@+@==== 253 | ====@+@====@+@==== 254 | ====@+@====@+@==== 255 | ====@+@@@@@@+@==== 256 | ====@++++++++@==== 257 | ====@@@@@@@@@@==== 258 | ================== 259 | '''.strip() 260 | unmaximize_focused_normal_map = close_focused_normal_map 261 | unmaximize_focused_prelight = unmaximize_focused_normal 262 | unmaximize_focused_prelight_map = minimize_focused_prelight_map 263 | unmaximize_focused_pressed = unmaximize_focused_normal 264 | unmaximize_focused_pressed_map = minimize_focused_pressed_map 265 | unmaximize_unfocused = unmaximize_focused_normal 266 | unmaximize_unfocused_map = close_unfocused_map 267 | 268 | #menu 269 | menu_focused_normal = ''' 270 | .................. 271 | .................. 272 | ================== 273 | ================== 274 | ================== 275 | ====@@@@@@@@@@==== 276 | ====@++++++++@==== 277 | =====@++++++@===== 278 | ======@++++@====== 279 | =======@++@======= 280 | ========@@======== 281 | ================== 282 | ================== 283 | ================== 284 | '''.strip() 285 | menu_focused_normal_map = close_focused_normal_map 286 | menu_focused_prelight = menu_focused_normal 287 | menu_focused_prelight_map = minimize_focused_prelight_map 288 | menu_focused_pressed = menu_focused_normal 289 | menu_focused_pressed_map = minimize_focused_prelight_map 290 | menu_unfocused = menu_focused_normal 291 | menu_unfocused_map = close_unfocused_map 292 | 293 | if __name__ == "__main__": 294 | build() 295 | -------------------------------------------------------------------------------- /themes/windowck-dark/xfwm4/Makefile.am: -------------------------------------------------------------------------------- 1 | themedir = $(datadir)/themes/Windowck-dark/xfwm4 2 | 3 | all: refresh all-am 4 | 5 | refresh: 6 | echo -e "Going to refresh xpm files"; \ 7 | ./generator.py; 8 | 9 | install-data: install-data-local 10 | 11 | install-data-local: 12 | echo -e "Going to copy files for $$size"; \ 13 | for file in `find . -name "*.xpm"` themerc; do \ 14 | $(mkdir_p) $(DESTDIR)$(themedir); \ 15 | $(install_sh_DATA) $$file $(DESTDIR)$(themedir); \ 16 | done; 17 | 18 | clean: clean-data-local clean-am 19 | 20 | clean-data-local: 21 | echo -e "Going to clean xpm files"; \ 22 | rm -f *.xpm; 23 | 24 | uninstall-local: uninstall-am 25 | 26 | -------------------------------------------------------------------------------- /themes/windowck-dark/xfwm4/generator.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | ''' 3 | simple-gtk xpm generator 4 | 5 | Copyright (C) 2012 Felipe A. Hernandez 6 | Portions adapted by Cedric Leporcq. 7 | 8 | This program is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with this program. If not, see . 20 | 21 | ''' 22 | 23 | from os import linesep 24 | 25 | 26 | def gendeg2(color1, color2, steps): 27 | ''' Generates a list of colors being a gradient from color1 to color2 on 28 | given steps number. ''' 29 | def fix(c): 30 | if c < 0: return 0 31 | elif c > 255: return 255 32 | return int(round(c)) 33 | a = [0]*steps 34 | c1 = (int(color1[1:3],16),int(color1[3:5],16),int(color1[5:7],16)) 35 | c2 = (int(color2[1:3],16),int(color2[3:5],16),int(color2[5:7],16)) 36 | ci = (float(c2[0]-c1[0])/(steps+1),float(c2[1]-c1[1])/(steps+1),float(c2[2]-c1[2])/(steps+1)) 37 | tr = [c1] 38 | for i in range(steps): 39 | tr.append((fix(tr[-1][0]+ci[0]),fix(tr[-1][1]+ci[1]),fix(tr[-1][2]+ci[2]))) 40 | tr.append(c2) 41 | return [("#%2s%2s%2s" % (hex(i[0])[2:],hex(i[1])[2:],hex(i[2])[2:])).replace(" ", "0") for i in tr] 42 | 43 | def gendeg3(color1, color2, color3, steps): 44 | ''' Generates a list of colors being a gradient from color1 to color3, with 45 | color2 at middle, with given steps number between each color. ''' 46 | return gendeg(color1,color2,steps)[:-1]+gendeg(color2,color3,steps) 47 | 48 | def gendeg(*args): 49 | ''' Interface between gendeg2 or gendeg3 depending on arg number ''' 50 | if len(args) == 3: return gendeg2(*args) 51 | elif len(args) == 4: return gendeg3(*args) 52 | raise NotImplemented("Bad arguments, see gendeg2 and gendeg3 documentation.") 53 | 54 | def genmap(dmap, chars, *gendeg_args): 55 | ''' 56 | 57 | ''' 58 | r = dict(zip(chars,gendeg(*gendeg_args))) 59 | r.update(dmap) 60 | return r 61 | 62 | def generate(name, txt, dic, x0=0, y0=0, w=None, h=None): 63 | ''' Creates xpm file with given name, given draw as string, colors as dict. 64 | Extra args are for generate parts of xpm. 65 | ''' 66 | if w is None: 67 | w = len(txt.split("\n")[0]) 68 | if h is None: 69 | h = len(txt.split("\n")) 70 | x1 = x0 + w 71 | y1 = y0 + h 72 | colors = {} 73 | lines = [i[x0:x1] for i in txt.split("\n")[y0:y1]] 74 | for i in lines: 75 | for j in i: 76 | if j not in colors: 77 | colors[j] = dic[j] 78 | xpmlines = [ 79 | "/* XPM */", 80 | "static char * %s = {" % name.replace("-", "_"), 81 | "\"%d %d %d 1\", " % (w, h, len(colors)) 82 | ] 83 | xpmlines.extend( 84 | "\"%s\tc %s\", " % i for i in list(colors.items()) 85 | ) 86 | xpmlines.extend( 87 | "\"%s\", " % i for i in lines 88 | ) 89 | xpmlines.append( 90 | "};" 91 | ) 92 | with open("%s.xpm" % name,"w") as f: f.write(linesep.join(xpmlines)) 93 | 94 | def holePos(txt): 95 | ''' Detects a hole on a xpm string, used to find border sizes.''' 96 | lines = txt.split("\n") 97 | for i in range(len(lines)): 98 | if " " in lines[i]: 99 | return (lines[i].find(" "),i) 100 | raise ValueError 101 | 102 | def holeSize(txt): 103 | ''' Detects hole on a xpm string, used to find border sizes.''' 104 | lastwidth = 0 105 | inhole = 0 106 | for line in txt.split("\n"): 107 | if " " in line: 108 | lastwidth = line.count(" ") 109 | inhole += 1 110 | elif inhole > 0: 111 | return (lastwidth, inhole) 112 | raise ValueError 113 | 114 | def build(): 115 | gvar = globals() 116 | for i in ("close", "hide", "maximize", "maximize_toggled", "menu", "shade", "shade_toggled", "stick", "stick_toggled"): 117 | for j in ("active", "pressed", "inactive", "prelight"): 118 | name = "%s_%s" % (i,j) 119 | if name in gvar: 120 | generate(name.replace("_", "-"), gvar[name], gvar["%s_map" % name]) 121 | 122 | alw, alh = (len(active.split("\n")[0]),len(active.split("\n"))) 123 | ilw, ilh = (len(inactive.split("\n")[0]),len(inactive.split("\n"))) 124 | 125 | ''' Find corner length on a xpm string.''' 126 | acw= len(active.split("+")[0]) 127 | icw= len(inactive.split("+")[0]) 128 | 129 | ahx, ahy = holePos(active) 130 | ihx, ihy = holePos(inactive) 131 | ahw, ahh = holeSize(active) 132 | ihw, ihh = holeSize(inactive) 133 | abw, abh = (alw-ahx-ahw, alh-ahy-ahh) 134 | ibw, ibh = (ilw-ihx-ihw, ilh-ihy-ihh) 135 | 136 | #top-left 137 | generate("top-left-active", active, amap, 0, 0, acw, ahy) 138 | generate("top-left-inactive", inactive, imap, 0, 0, icw, ihy) 139 | #left 140 | generate("left-active", active, amap, 0, ahy, ahx, ahh) 141 | generate("left-inactive", inactive, imap, 0, ihy, ihx, ihh) 142 | #bottom-left 143 | generate("bottom-left-active", active, amap, 0, ahy+ahh, ahx, abh) 144 | generate("bottom-left-inactive", inactive, imap, 0, ihy+ihh, ihx, ibh) 145 | 146 | #top-right 147 | generate("top-right-active", active, amap, alw-acw, 0, acw, ahy) 148 | generate("top-right-inactive", inactive, imap, ilw-icw, 0, icw, ihy) 149 | #right 150 | generate("right-active", active, amap, ahx+ahw, ahy, abw, ahh) 151 | generate("right-inactive", inactive, imap, ihx+ihw, ihy, ibw, ihh) 152 | #bottom-right 153 | generate("bottom-right-active", active, amap, ahx+ahw, ahy+ahh, abw, abh) 154 | generate("bottom-right-inactive", inactive, imap, ihx+ihw, ihy+ihh, ibw, ibh) 155 | 156 | #top 157 | for i in range(1,6): 158 | generate("title-%d-active" % i, active, amap, acw, 0, alw-2*acw, ahy) 159 | generate("title-%d-inactive" % i, inactive, imap, icw, 0, alw-2*icw, ihy) 160 | 161 | #bottom 162 | generate("bottom-active", active, amap, ahx, ahy+ahh, ahw, ibh) 163 | generate("bottom-inactive", inactive, imap, ihx, ihy+ihh, ihw, ibh) 164 | 165 | #close 166 | close_active = ''' 167 | .................. 168 | .................. 169 | ================== 170 | =====@@====@@===== 171 | ====@++@==@++@==== 172 | ====@+++@@+++@==== 173 | =====@++++++@===== 174 | ======@++++@====== 175 | ======@++++@====== 176 | =====@++++++@===== 177 | ====@+++@@+++@==== 178 | ====@++@==@++@==== 179 | =====@@====@@===== 180 | ================== 181 | '''.strip() 182 | 183 | chars = ["+", "@", "#", "=", "-"] 184 | dmap = [(".", "None")] 185 | close_active_map = { 186 | "." : "None", 187 | "=" : "#3C3C3C", 188 | "+" : "#E6E6E6", 189 | "@" : "#3C3C3C", 190 | "#" : "None", 191 | } 192 | 193 | close_prelight = close_active 194 | close_prelight_map = { 195 | "." : "None", 196 | "=" : "#3C3C3C", 197 | "+" : "#D92626", 198 | "@" : "#000000", 199 | "#" : "None", 200 | } 201 | 202 | close_pressed = close_active 203 | close_pressed_map = { 204 | "." : "None", 205 | "=" : "#3C3C3C", 206 | "+" : "#D92626", 207 | "@" : "#3C3C3C", 208 | "#" : "#000000", 209 | } 210 | 211 | close_inactive = close_active 212 | close_inactive_map = { 213 | "." : "None", 214 | "=" : "#3C3C3C", 215 | "+" : "#A1A1A1", 216 | "@" : "#3C3C3C", 217 | "#" : "None", 218 | } 219 | 220 | #hide 221 | hide_active = ''' 222 | .................. 223 | .................. 224 | ================== 225 | ================== 226 | ================== 227 | ================== 228 | ================== 229 | ================== 230 | ================== 231 | ===@@@@@@@@@@@@=== 232 | ===@++++++++++@=== 233 | ===@++++++++++@=== 234 | ===@@@@@@@@@@@@=== 235 | ================== 236 | '''.strip() 237 | hide_active_map = close_active_map 238 | hide_prelight = hide_active 239 | hide_prelight_map = { 240 | "." : "None", 241 | "=" : "#3C3C3C", 242 | "+" : "#FFFFFF", 243 | "@" : "#000000", 244 | } 245 | 246 | hide_pressed = hide_active 247 | hide_pressed_map = { 248 | "." : "None", 249 | "=" : "#3C3C3C", 250 | "+" : "#FFFFFF", 251 | "@" : "#3C3C3C", 252 | } 253 | 254 | hide_inactive = hide_active 255 | hide_inactive_map = close_inactive_map 256 | 257 | #maximize 258 | maximize_active = ''' 259 | .................. 260 | .................. 261 | ===@@@@@@@@@@@@=== 262 | ===@++++++++++@=== 263 | ===@++++++++++@=== 264 | ===@+@@@@@@@@+@=== 265 | ===@+@======@+@=== 266 | ===@+@======@+@=== 267 | ===@+@======@+@=== 268 | ===@+@======@+@=== 269 | ===@+@@@@@@@@+@=== 270 | ===@++++++++++@=== 271 | ===@@@@@@@@@@@@=== 272 | ================== 273 | '''.strip() 274 | maximize_active_map = close_active_map 275 | maximize_prelight = maximize_active 276 | maximize_prelight_map = hide_prelight_map 277 | maximize_pressed = maximize_active 278 | maximize_pressed_map = hide_pressed_map 279 | maximize_inactive = maximize_active 280 | maximize_inactive_map = close_inactive_map 281 | 282 | #maximize-toggled 283 | maximize_toggled_active = ''' 284 | .................. 285 | .................. 286 | ================== 287 | ================== 288 | ====@@@@@@@@@@==== 289 | ====@++++++++@==== 290 | ====@++++++++@==== 291 | ====@+@@@@@@+@==== 292 | ====@+@====@+@==== 293 | ====@+@====@+@==== 294 | ====@+@@@@@@+@==== 295 | ====@++++++++@==== 296 | ====@@@@@@@@@@==== 297 | ================== 298 | '''.strip() 299 | maximize_toggled_active_map = close_active_map 300 | maximize_toggled_prelight = maximize_toggled_active 301 | maximize_toggled_prelight_map = hide_prelight_map 302 | maximize_toggled_pressed = maximize_toggled_active 303 | maximize_toggled_pressed_map = hide_pressed_map 304 | maximize_toggled_inactive = maximize_toggled_active 305 | maximize_toggled_inactive_map = close_inactive_map 306 | 307 | #menu 308 | menu_active = ''' 309 | .................. 310 | .................. 311 | ================== 312 | ================== 313 | ================== 314 | ====@@@@@@@@@@==== 315 | ====@++++++++@==== 316 | =====@++++++@===== 317 | ======@++++@====== 318 | =======@++@======= 319 | ========@@======== 320 | ================== 321 | ================== 322 | ================== 323 | '''.strip() 324 | menu_active_map = close_active_map 325 | menu_prelight = menu_active 326 | menu_prelight_map = hide_prelight_map 327 | menu_pressed = menu_active 328 | menu_pressed_map = hide_prelight_map 329 | menu_inactive = menu_active 330 | menu_inactive_map = close_inactive_map 331 | 332 | #shade 333 | shade_active = ''' 334 | .................. 335 | .................. 336 | ================== 337 | ========@@======== 338 | =======@++@======= 339 | ======@++++@====== 340 | =====@++++++@===== 341 | ====@++++++++@==== 342 | ====@++@++@++@==== 343 | =====@@@++@@@===== 344 | =======@++@======= 345 | =======@++@======= 346 | ========@@======== 347 | ================== 348 | '''.strip() 349 | shade_active_map = close_active_map 350 | shade_prelight = shade_active 351 | shade_prelight_map = hide_prelight_map 352 | shade_pressed = shade_active 353 | shade_pressed_map = hide_pressed_map 354 | shade_inactive = shade_active 355 | shade_inactive_map = menu_inactive_map 356 | 357 | #shade-toggled 358 | shade_toggled_active = ''' 359 | .................. 360 | .................. 361 | ================== 362 | ========@@======== 363 | =======@++@======= 364 | =======@++@======= 365 | =====@@@++@@@===== 366 | ====@++@++@++@==== 367 | ====@++++++++@==== 368 | =====@++++++@===== 369 | ======@++++@====== 370 | =======@++@======= 371 | ========@@======== 372 | ================== 373 | '''.strip() 374 | shade_toggled_active_map = close_active_map 375 | shade_toggled_prelight = shade_toggled_active 376 | shade_toggled_prelight_map = hide_prelight_map 377 | shade_toggled_pressed = shade_toggled_active 378 | shade_toggled_pressed_map = hide_pressed_map 379 | shade_toggled_inactive = shade_toggled_active 380 | shade_toggled_inactive_map = menu_inactive_map 381 | 382 | #stick 383 | stick_active = ''' 384 | .................. 385 | .................. 386 | ================== 387 | =======@@@@======= 388 | ======@++++@====== 389 | =====@++++++@===== 390 | ====@++@@@@++@==== 391 | ====@++@==@++@==== 392 | ====@++@==@++@==== 393 | ====@++@@@@++@==== 394 | =====@++++++@===== 395 | ======@++++@====== 396 | =======@@@@======= 397 | ================== 398 | '''.strip() 399 | stick_active_map = close_active_map 400 | stick_prelight = stick_active 401 | stick_prelight_map = hide_prelight_map 402 | stick_pressed = stick_active 403 | stick_pressed_map = hide_pressed_map 404 | stick_inactive = stick_active 405 | stick_inactive_map = menu_inactive_map 406 | 407 | #stick-toggled 408 | stick_toggled_active = ''' 409 | .................. 410 | .................. 411 | ================== 412 | =======@@@@======= 413 | ======@++++@====== 414 | =====@++++++@===== 415 | ====@++@@@@++@==== 416 | ====@++@++@++@==== 417 | ====@++@++@++@==== 418 | ====@++@@@@++@==== 419 | =====@++++++@===== 420 | ======@++++@====== 421 | =======@@@@======= 422 | ================== 423 | '''.strip() 424 | stick_toggled_active_map = close_active_map 425 | stick_toggled_prelight = stick_toggled_active 426 | stick_toggled_prelight_map = hide_prelight_map 427 | stick_toggled_pressed = stick_toggled_active 428 | stick_toggled_pressed_map = hide_pressed_map 429 | stick_toggled_inactive = stick_toggled_active 430 | stick_toggled_inactive_map = menu_inactive_map 431 | 432 | 433 | active = ''' 434 | ..+++++++++.. 435 | .+%%%%%%%%%+. 436 | +%%%%%%%%%%%+ 437 | +%%%%%%%%%%%+ 438 | +%%%%%%%%%%%+ 439 | +%%%%%%%%%%%+ 440 | +%%%%%%%%%%%+ 441 | +%%%%%%%%%%%+ 442 | +%%%%%%%%%%%+ 443 | +%%%%%%%%%%%+ 444 | +%%%%%%%%%%%+ 445 | +%%%%%%%%%%%+ 446 | +%%%%%%%%%%%+ 447 | +%%%%%%%%%%%+ 448 | +% %+ 449 | +%%%%%%%%%%%+ 450 | +%%%%%%%%%%%+ 451 | .+++++++++++. 452 | '''.strip() 453 | amap = { 454 | "=" : "#000000", 455 | "+" : "#000000", 456 | "%" : "#3C3C3C", 457 | "#" : "#000000", 458 | "." : "None", 459 | } 460 | inactive = active 461 | imap = amap 462 | 463 | if __name__ == "__main__": 464 | build() 465 | -------------------------------------------------------------------------------- /themes/windowck-dark/xfwm4/themerc: -------------------------------------------------------------------------------- 1 | button_offset=0 2 | button_spacing=0 3 | show_app_icon=false 4 | maximized_offset=0 5 | title_vertical_offset_active=1 6 | title_vertical_offset_inactive=1 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /themes/windowck/Makefile.am: -------------------------------------------------------------------------------- 1 | # themes/Makefile.am 2 | # 3 | 4 | SUBDIRS = xfwm4 unity 5 | -------------------------------------------------------------------------------- /themes/windowck/unity/Makefile.am: -------------------------------------------------------------------------------- 1 | themedir = $(datadir)/themes/Windowck/unity 2 | 3 | all: generate all-am 4 | 5 | generate: 6 | echo -e "Going to convert xpm to png files"; \ 7 | ./generator.py; 8 | 9 | install-data: install-data-local 10 | 11 | install-data-local: 12 | echo -e "Going to copy files for $$size"; \ 13 | for file in `find . -name "*.png"`; do \ 14 | $(mkdir_p) $(DESTDIR)$(themedir); \ 15 | $(install_sh_DATA) $$file $(DESTDIR)$(themedir); \ 16 | done; 17 | 18 | clean: clean-data-local clean-am 19 | 20 | clean-data-local: 21 | echo -e "Going to clean png files"; \ 22 | rm -f *.png *.xpm; 23 | 24 | uninstall-local: uninstall-am 25 | -------------------------------------------------------------------------------- /themes/windowck/unity/generator.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | ''' 3 | simple-gtk xpm generator 4 | 5 | Copyright (C) 2012 Felipe A. Hernandez 6 | Portions adapted by Cedric Leporcq. 7 | 8 | This program is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with this program. If not, see . 20 | 21 | ''' 22 | import os 23 | from os import linesep 24 | 25 | 26 | def gendeg2(color1, color2, steps): 27 | ''' Generates a list of colors being a gradient from color1 to color2 on 28 | given steps number. ''' 29 | def fix(c): 30 | if c < 0: return 0 31 | elif c > 255: return 255 32 | return int(round(c)) 33 | a = [0]*steps 34 | c1 = (int(color1[1:3],16),int(color1[3:5],16),int(color1[5:7],16)) 35 | c2 = (int(color2[1:3],16),int(color2[3:5],16),int(color2[5:7],16)) 36 | ci = (float(c2[0]-c1[0])/(steps+1),float(c2[1]-c1[1])/(steps+1),float(c2[2]-c1[2])/(steps+1)) 37 | tr = [c1] 38 | for i in range(steps): 39 | tr.append((fix(tr[-1][0]+ci[0]),fix(tr[-1][1]+ci[1]),fix(tr[-1][2]+ci[2]))) 40 | tr.append(c2) 41 | return [("#%2s%2s%2s" % (hex(i[0])[2:],hex(i[1])[2:],hex(i[2])[2:])).replace(" ", "0") for i in tr] 42 | 43 | def gendeg3(color1, color2, color3, steps): 44 | ''' Generates a list of colors being a gradient from color1 to color3, with 45 | color2 at middle, with given steps number between each color. ''' 46 | return gendeg(color1,color2,steps)[:-1]+gendeg(color2,color3,steps) 47 | 48 | def gendeg(*args): 49 | ''' Interface between gendeg2 or gendeg3 depending on arg number ''' 50 | if len(args) == 3: return gendeg2(*args) 51 | elif len(args) == 4: return gendeg3(*args) 52 | raise NotImplemented("Bad arguments, see gendeg2 and gendeg3 documentation.") 53 | 54 | def genmap(dmap, chars, *gendeg_args): 55 | ''' 56 | 57 | ''' 58 | r = dict(zip(chars,gendeg(*gendeg_args))) 59 | r.update(dmap) 60 | return r 61 | 62 | def generate(name, txt, dic, x0=0, y0=0, w=None, h=None): 63 | ''' Creates xpm file with given name, given draw as string, colors as dict. 64 | Extra args are for generate parts of xpm. 65 | ''' 66 | if w is None: 67 | w = len(txt.split("\n")[0]) 68 | if h is None: 69 | h = len(txt.split("\n")) 70 | x1 = x0 + w 71 | y1 = y0 + h 72 | colors = {} 73 | lines = [i[x0:x1] for i in txt.split("\n")[y0:y1]] 74 | for i in lines: 75 | for j in i: 76 | if j not in colors: 77 | colors[j] = dic[j] 78 | xpmlines = [ 79 | "/* XPM */", 80 | "static char * %s = {" % name.replace("-", "_"), 81 | "\"%d %d %d 1\", " % (w, h, len(colors)) 82 | ] 83 | xpmlines.extend( 84 | "\"%s\tc %s\", " % i for i in list(colors.items()) 85 | ) 86 | xpmlines.extend( 87 | "\"%s\", " % i for i in lines 88 | ) 89 | xpmlines.append( 90 | "};" 91 | ) 92 | with open("%s.xpm" % name,"w") as f: f.write(linesep.join(xpmlines)) 93 | 94 | def holePos(txt): 95 | ''' Detects a hole on a xpm string, used to find border sizes.''' 96 | lines = txt.split("\n") 97 | for i in range(len(lines)): 98 | if " " in lines[i]: 99 | return (lines[i].find(" "),i) 100 | raise ValueError 101 | 102 | def holeSize(txt): 103 | ''' Detects hole on a xpm string, used to find border sizes.''' 104 | lastwidth = 0 105 | inhole = 0 106 | for line in txt.split("\n"): 107 | if " " in line: 108 | lastwidth = line.count(" ") 109 | inhole += 1 110 | elif inhole > 0: 111 | return (lastwidth, inhole) 112 | raise ValueError 113 | 114 | def build(): 115 | gvar = globals() 116 | for i in ("close", "maximize", "minimize", "menu", "unmaximize"): 117 | for j in ("focused_normal", "focused_prelight", "focused_pressed", "unfocused"): 118 | name = "%s_%s" % (i,j) 119 | if name in gvar: 120 | generate(name, gvar[name], gvar["%s_map" % name]) 121 | os.system("convert %s.xpm %s.png" % (name,name)) 122 | os.system("cp %s_focused_normal.png %s.png" % (i,i)) 123 | 124 | #close 125 | close_focused_normal = ''' 126 | .................. 127 | .................. 128 | ================== 129 | =====@@====@@===== 130 | ====@++@==@++@==== 131 | ====@+++@@+++@==== 132 | =====@++++++@===== 133 | ======@++++@====== 134 | ======@++++@====== 135 | =====@++++++@===== 136 | ====@+++@@+++@==== 137 | ====@++@==@++@==== 138 | =====@@====@@===== 139 | ================== 140 | '''.strip() 141 | 142 | chars = ["+", "@", "#", "=", "-"] 143 | dmap = [(".", "None")] 144 | close_focused_normal_map = { 145 | "." : "None", 146 | "=" : "None", 147 | "+" : "#202020", 148 | "@" : "None", 149 | "#" : "None", 150 | } 151 | 152 | close_focused_prelight = close_focused_normal 153 | close_focused_prelight_map = { 154 | "." : "None", 155 | "=" : "None", 156 | "+" : "#D92626", 157 | "@" : "#000000", 158 | "#" : "None", 159 | } 160 | 161 | close_focused_pressed = close_focused_normal 162 | close_focused_pressed_map = { 163 | "." : "None", 164 | "=" : "None", 165 | "+" : "#D92626", 166 | "@" : "None", 167 | "#" : "None", 168 | } 169 | 170 | close_unfocused = close_focused_normal 171 | close_unfocused_map = { 172 | "." : "None", 173 | "=" : "None", 174 | "+" : "#606060", 175 | "@" : "None", 176 | "#" : "None", 177 | } 178 | 179 | #hide 180 | minimize_focused_normal = ''' 181 | .................. 182 | .................. 183 | ================== 184 | ================== 185 | ================== 186 | ================== 187 | ================== 188 | ================== 189 | ================== 190 | ===@@@@@@@@@@@@=== 191 | ===@++++++++++@=== 192 | ===@++++++++++@=== 193 | ===@@@@@@@@@@@@=== 194 | ================== 195 | '''.strip() 196 | minimize_focused_normal_map = close_focused_normal_map 197 | minimize_focused_prelight = minimize_focused_normal 198 | minimize_focused_prelight_map = { 199 | "." : "None", 200 | "=" : "None", 201 | "+" : "#000000", 202 | "@" : "#FFFFFF", 203 | "#" : "#000000", 204 | } 205 | 206 | minimize_focused_pressed = minimize_focused_normal 207 | minimize_focused_pressed_map = { 208 | "." : "None", 209 | "=" : "None", 210 | "+" : "#000000", 211 | "@" : "None", 212 | "#" : "#000000", 213 | } 214 | 215 | minimize_unfocused = minimize_focused_normal 216 | minimize_unfocused_map = close_unfocused_map 217 | 218 | #maximize 219 | maximize_focused_normal = ''' 220 | .................. 221 | .................. 222 | ===@@@@@@@@@@@@=== 223 | ===@++++++++++@=== 224 | ===@++++++++++@=== 225 | ===@+@@@@@@@@+@=== 226 | ===@+@======@+@=== 227 | ===@+@======@+@=== 228 | ===@+@======@+@=== 229 | ===@+@======@+@=== 230 | ===@+@@@@@@@@+@=== 231 | ===@++++++++++@=== 232 | ===@@@@@@@@@@@@=== 233 | ================== 234 | '''.strip() 235 | maximize_focused_normal_map = close_focused_normal_map 236 | maximize_focused_prelight = maximize_focused_normal 237 | maximize_focused_prelight_map = minimize_focused_prelight_map 238 | maximize_focused_pressed = maximize_focused_normal 239 | maximize_focused_pressed_map = minimize_focused_pressed_map 240 | maximize_unfocused = maximize_focused_normal 241 | maximize_unfocused_map = close_unfocused_map 242 | 243 | #maximize-toggled 244 | unmaximize_focused_normal = ''' 245 | .................. 246 | .................. 247 | ================== 248 | ================== 249 | ====@@@@@@@@@@==== 250 | ====@++++++++@==== 251 | ====@++++++++@==== 252 | ====@+@@@@@@+@==== 253 | ====@+@====@+@==== 254 | ====@+@====@+@==== 255 | ====@+@@@@@@+@==== 256 | ====@++++++++@==== 257 | ====@@@@@@@@@@==== 258 | ================== 259 | '''.strip() 260 | unmaximize_focused_normal_map = close_focused_normal_map 261 | unmaximize_focused_prelight = unmaximize_focused_normal 262 | unmaximize_focused_prelight_map = minimize_focused_prelight_map 263 | unmaximize_focused_pressed = unmaximize_focused_normal 264 | unmaximize_focused_pressed_map = minimize_focused_pressed_map 265 | unmaximize_unfocused = unmaximize_focused_normal 266 | unmaximize_unfocused_map = close_unfocused_map 267 | 268 | #menu 269 | menu_focused_normal = ''' 270 | .................. 271 | .................. 272 | ================== 273 | ================== 274 | ================== 275 | ====@@@@@@@@@@==== 276 | ====@++++++++@==== 277 | =====@++++++@===== 278 | ======@++++@====== 279 | =======@++@======= 280 | ========@@======== 281 | ================== 282 | ================== 283 | ================== 284 | '''.strip() 285 | menu_focused_normal_map = close_focused_normal_map 286 | menu_focused_prelight = menu_focused_normal 287 | menu_focused_prelight_map = minimize_focused_prelight_map 288 | menu_focused_pressed = menu_focused_normal 289 | menu_focused_pressed_map = minimize_focused_prelight_map 290 | menu_unfocused = menu_focused_normal 291 | menu_unfocused_map = close_unfocused_map 292 | 293 | if __name__ == "__main__": 294 | build() 295 | -------------------------------------------------------------------------------- /themes/windowck/xfwm4/Makefile.am: -------------------------------------------------------------------------------- 1 | themedir = $(datadir)/themes/Windowck/xfwm4 2 | 3 | all: refresh all-am 4 | 5 | refresh: 6 | echo -e "Going to refresh xpm files"; \ 7 | ./generator.py; 8 | 9 | install-data: install-data-local 10 | 11 | install-data-local: 12 | echo -e "Going to copy files for $$size"; \ 13 | for file in `find . -name "*.xpm"` themerc; do \ 14 | $(mkdir_p) $(DESTDIR)$(themedir); \ 15 | $(install_sh_DATA) $$file $(DESTDIR)$(themedir); \ 16 | done; 17 | 18 | clean: clean-data-local clean-am 19 | 20 | clean-data-local: 21 | echo -e "Going to clean xpm files"; \ 22 | rm -f *.xpm; 23 | 24 | uninstall-local: uninstall-am 25 | -------------------------------------------------------------------------------- /themes/windowck/xfwm4/generator.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | ''' 3 | simple-gtk xpm generator 4 | 5 | Copyright (C) 2012 Felipe A. Hernandez 6 | Portions adapted by Cedric Leporcq. 7 | 8 | This program is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with this program. If not, see . 20 | 21 | ''' 22 | 23 | from os import linesep 24 | 25 | 26 | def gendeg2(color1, color2, steps): 27 | ''' Generates a list of colors being a gradient from color1 to color2 on 28 | given steps number. ''' 29 | def fix(c): 30 | if c < 0: return 0 31 | elif c > 255: return 255 32 | return int(round(c)) 33 | a = [0]*steps 34 | c1 = (int(color1[1:3],16),int(color1[3:5],16),int(color1[5:7],16)) 35 | c2 = (int(color2[1:3],16),int(color2[3:5],16),int(color2[5:7],16)) 36 | ci = (float(c2[0]-c1[0])/(steps+1),float(c2[1]-c1[1])/(steps+1),float(c2[2]-c1[2])/(steps+1)) 37 | tr = [c1] 38 | for i in range(steps): 39 | tr.append((fix(tr[-1][0]+ci[0]),fix(tr[-1][1]+ci[1]),fix(tr[-1][2]+ci[2]))) 40 | tr.append(c2) 41 | return [("#%2s%2s%2s" % (hex(i[0])[2:],hex(i[1])[2:],hex(i[2])[2:])).replace(" ", "0") for i in tr] 42 | 43 | def gendeg3(color1, color2, color3, steps): 44 | ''' Generates a list of colors being a gradient from color1 to color3, with 45 | color2 at middle, with given steps number between each color. ''' 46 | return gendeg(color1,color2,steps)[:-1]+gendeg(color2,color3,steps) 47 | 48 | def gendeg(*args): 49 | ''' Interface between gendeg2 or gendeg3 depending on arg number ''' 50 | if len(args) == 3: return gendeg2(*args) 51 | elif len(args) == 4: return gendeg3(*args) 52 | raise NotImplemented("Bad arguments, see gendeg2 and gendeg3 documentation.") 53 | 54 | def genmap(dmap, chars, *gendeg_args): 55 | ''' 56 | 57 | ''' 58 | r = dict(zip(chars,gendeg(*gendeg_args))) 59 | r.update(dmap) 60 | return r 61 | 62 | def generate(name, txt, dic, x0=0, y0=0, w=None, h=None): 63 | ''' Creates xpm file with given name, given draw as string, colors as dict. 64 | Extra args are for generate parts of xpm. 65 | ''' 66 | if w is None: 67 | w = len(txt.split("\n")[0]) 68 | if h is None: 69 | h = len(txt.split("\n")) 70 | x1 = x0 + w 71 | y1 = y0 + h 72 | colors = {} 73 | lines = [i[x0:x1] for i in txt.split("\n")[y0:y1]] 74 | for i in lines: 75 | for j in i: 76 | if j not in colors: 77 | colors[j] = dic[j] 78 | xpmlines = [ 79 | "/* XPM */", 80 | "static char * %s = {" % name.replace("-", "_"), 81 | "\"%d %d %d 1\", " % (w, h, len(colors)) 82 | ] 83 | xpmlines.extend( 84 | "\"%s\tc %s\", " % i for i in list(colors.items()) 85 | ) 86 | xpmlines.extend( 87 | "\"%s\", " % i for i in lines 88 | ) 89 | xpmlines.append( 90 | "};" 91 | ) 92 | with open("%s.xpm" % name,"w") as f: f.write(linesep.join(xpmlines)) 93 | 94 | def holePos(txt): 95 | ''' Detects a hole on a xpm string, used to find border sizes.''' 96 | lines = txt.split("\n") 97 | for i in range(len(lines)): 98 | if " " in lines[i]: 99 | return (lines[i].find(" "),i) 100 | raise ValueError 101 | 102 | def holeSize(txt): 103 | ''' Detects hole on a xpm string, used to find border sizes.''' 104 | lastwidth = 0 105 | inhole = 0 106 | for line in txt.split("\n"): 107 | if " " in line: 108 | lastwidth = line.count(" ") 109 | inhole += 1 110 | elif inhole > 0: 111 | return (lastwidth, inhole) 112 | raise ValueError 113 | 114 | def build(): 115 | gvar = globals() 116 | for i in ("close", "hide", "maximize", "maximize_toggled", "menu", "shade", "shade_toggled", "stick", "stick_toggled"): 117 | for j in ("active", "pressed", "inactive", "prelight"): 118 | name = "%s_%s" % (i,j) 119 | if name in gvar: 120 | generate(name.replace("_", "-"), gvar[name], gvar["%s_map" % name]) 121 | 122 | alw, alh = (len(active.split("\n")[0]),len(active.split("\n"))) 123 | ilw, ilh = (len(inactive.split("\n")[0]),len(inactive.split("\n"))) 124 | 125 | ''' Find corner length on a xpm string.''' 126 | acw= len(active.split("+")[0]) 127 | icw= len(inactive.split("+")[0]) 128 | 129 | ahx, ahy = holePos(active) 130 | ihx, ihy = holePos(inactive) 131 | ahw, ahh = holeSize(active) 132 | ihw, ihh = holeSize(inactive) 133 | abw, abh = (alw-ahx-ahw, alh-ahy-ahh) 134 | ibw, ibh = (ilw-ihx-ihw, ilh-ihy-ihh) 135 | 136 | #top-left 137 | generate("top-left-active", active, amap, 0, 0, acw, ahy) 138 | generate("top-left-inactive", inactive, imap, 0, 0, icw, ihy) 139 | #left 140 | generate("left-active", active, amap, 0, ahy, ahx, ahh) 141 | generate("left-inactive", inactive, imap, 0, ihy, ihx, ihh) 142 | #bottom-left 143 | generate("bottom-left-active", active, amap, 0, ahy+ahh, ahx, abh) 144 | generate("bottom-left-inactive", inactive, imap, 0, ihy+ihh, ihx, ibh) 145 | 146 | #top-right 147 | generate("top-right-active", active, amap, alw-acw, 0, acw, ahy) 148 | generate("top-right-inactive", inactive, imap, ilw-icw, 0, icw, ihy) 149 | #right 150 | generate("right-active", active, amap, ahx+ahw, ahy, abw, ahh) 151 | generate("right-inactive", inactive, imap, ihx+ihw, ihy, ibw, ihh) 152 | #bottom-right 153 | generate("bottom-right-active", active, amap, ahx+ahw, ahy+ahh, abw, abh) 154 | generate("bottom-right-inactive", inactive, imap, ihx+ihw, ihy+ihh, ibw, ibh) 155 | 156 | #top 157 | for i in range(1,6): 158 | generate("title-%d-active" % i, active, amap, acw, 0, alw-2*acw, ahy) 159 | generate("title-%d-inactive" % i, inactive, imap, icw, 0, alw-2*icw, ihy) 160 | 161 | #bottom 162 | generate("bottom-active", active, amap, ahx, ahy+ahh, ahw, ibh) 163 | generate("bottom-inactive", inactive, imap, ihx, ihy+ihh, ihw, ibh) 164 | 165 | #close 166 | close_active = ''' 167 | .................. 168 | .................. 169 | ================== 170 | =====@@====@@===== 171 | ====@++@==@++@==== 172 | ====@+++@@+++@==== 173 | =====@++++++@===== 174 | ======@++++@====== 175 | ======@++++@====== 176 | =====@++++++@===== 177 | ====@+++@@+++@==== 178 | ====@++@==@++@==== 179 | =====@@====@@===== 180 | ================== 181 | '''.strip() 182 | 183 | chars = ["+", "@", "#", "=", "-"] 184 | dmap = [(".", "None")] 185 | close_active_map = { 186 | "." : "None", 187 | "=" : "#000000 s active_color_2", 188 | "+" : "#202020", 189 | "@" : "#000000 s active_color_2", 190 | "#" : "None", 191 | } 192 | 193 | close_prelight = close_active 194 | close_prelight_map = { 195 | "." : "None", 196 | "=" : "#000000 s active_color_2", 197 | "+" : "#D92626", 198 | "@" : "#000000 s active_color_2", 199 | "#" : "None", 200 | } 201 | 202 | close_pressed = close_active 203 | close_pressed_map = { 204 | "." : "None", 205 | "=" : "#000000 s active_color_2", 206 | "+" : "#D92626", 207 | "@" : "#000000 s active_color_2", 208 | "#" : "None", 209 | } 210 | 211 | close_inactive = close_active 212 | close_inactive_map = { 213 | "." : "None", 214 | "=" : "#000000 s inactive_color_2", 215 | "+" : "#606060 s inactive_text_color", 216 | "@" : "#000000 s inactive_color_2", 217 | "#" : "#606060 s inactive_text_color", 218 | } 219 | 220 | #hide 221 | hide_active = ''' 222 | .................. 223 | .................. 224 | ================== 225 | ================== 226 | ================== 227 | ================== 228 | ================== 229 | ================== 230 | ================== 231 | ===@@@@@@@@@@@@=== 232 | ===@++++++++++@=== 233 | ===@++++++++++@=== 234 | ===@@@@@@@@@@@@=== 235 | ================== 236 | '''.strip() 237 | hide_active_map = close_active_map 238 | hide_prelight = hide_active 239 | hide_prelight_map = { 240 | "." : "None", 241 | "=" : "#000000 s active_color_2", 242 | "+" : "#000000", 243 | "@" : "#FFFFFF", 244 | } 245 | 246 | hide_pressed = hide_active 247 | hide_pressed_map = { 248 | "." : "None", 249 | "=" : "#000000 s active_color_2", 250 | "+" : "#000000", 251 | "@" : "#000000 s active_color_2", 252 | } 253 | 254 | hide_inactive = hide_active 255 | hide_inactive_map = close_inactive_map 256 | 257 | #maximize 258 | maximize_active = ''' 259 | .................. 260 | .................. 261 | ===@@@@@@@@@@@@=== 262 | ===@++++++++++@=== 263 | ===@++++++++++@=== 264 | ===@+@@@@@@@@+@=== 265 | ===@+@======@+@=== 266 | ===@+@======@+@=== 267 | ===@+@======@+@=== 268 | ===@+@======@+@=== 269 | ===@+@@@@@@@@+@=== 270 | ===@++++++++++@=== 271 | ===@@@@@@@@@@@@=== 272 | ================== 273 | '''.strip() 274 | maximize_active_map = close_active_map 275 | maximize_prelight = maximize_active 276 | maximize_prelight_map = hide_prelight_map 277 | maximize_pressed = maximize_active 278 | maximize_pressed_map = hide_pressed_map 279 | maximize_inactive = maximize_active 280 | maximize_inactive_map = close_inactive_map 281 | 282 | #maximize-toggled 283 | maximize_toggled_active = ''' 284 | .................. 285 | .................. 286 | ================== 287 | ================== 288 | ====@@@@@@@@@@==== 289 | ====@++++++++@==== 290 | ====@++++++++@==== 291 | ====@+@@@@@@+@==== 292 | ====@+@====@+@==== 293 | ====@+@====@+@==== 294 | ====@+@@@@@@+@==== 295 | ====@++++++++@==== 296 | ====@@@@@@@@@@==== 297 | ================== 298 | '''.strip() 299 | maximize_toggled_active_map = close_active_map 300 | maximize_toggled_prelight = maximize_toggled_active 301 | maximize_toggled_prelight_map = hide_prelight_map 302 | maximize_toggled_pressed = maximize_toggled_active 303 | maximize_toggled_pressed_map = hide_pressed_map 304 | maximize_toggled_inactive = maximize_toggled_active 305 | maximize_toggled_inactive_map = close_inactive_map 306 | 307 | #menu 308 | menu_active = ''' 309 | .................. 310 | .................. 311 | ================== 312 | ================== 313 | ================== 314 | ====@@@@@@@@@@==== 315 | ====@++++++++@==== 316 | =====@++++++@===== 317 | ======@++++@====== 318 | =======@++@======= 319 | ========@@======== 320 | ================== 321 | ================== 322 | ================== 323 | '''.strip() 324 | menu_active_map = close_active_map 325 | menu_prelight = menu_active 326 | menu_prelight_map = hide_prelight_map 327 | menu_pressed = menu_active 328 | menu_pressed_map = hide_prelight_map 329 | menu_inactive = menu_active 330 | menu_inactive_map = close_inactive_map 331 | 332 | #shade 333 | shade_active = ''' 334 | .................. 335 | .................. 336 | ================== 337 | ========@@======== 338 | =======@++@======= 339 | ======@++++@====== 340 | =====@++++++@===== 341 | ====@++++++++@==== 342 | ====@++@++@++@==== 343 | =====@@@++@@@===== 344 | =======@++@======= 345 | =======@++@======= 346 | ========@@======== 347 | ================== 348 | '''.strip() 349 | shade_active_map = close_active_map 350 | shade_prelight = shade_active 351 | shade_prelight_map = hide_prelight_map 352 | shade_pressed = shade_active 353 | shade_pressed_map = hide_pressed_map 354 | shade_inactive = shade_active 355 | shade_inactive_map = menu_inactive_map 356 | 357 | #shade-toggled 358 | shade_toggled_active = ''' 359 | .................. 360 | .................. 361 | ================== 362 | ========@@======== 363 | =======@++@======= 364 | =======@++@======= 365 | =====@@@++@@@===== 366 | ====@++@++@++@==== 367 | ====@++++++++@==== 368 | =====@++++++@===== 369 | ======@++++@====== 370 | =======@++@======= 371 | ========@@======== 372 | ================== 373 | '''.strip() 374 | shade_toggled_active_map = close_active_map 375 | shade_toggled_prelight = shade_toggled_active 376 | shade_toggled_prelight_map = hide_prelight_map 377 | shade_toggled_pressed = shade_toggled_active 378 | shade_toggled_pressed_map = hide_pressed_map 379 | shade_toggled_inactive = shade_toggled_active 380 | shade_toggled_inactive_map = menu_inactive_map 381 | 382 | #stick 383 | stick_active = ''' 384 | .................. 385 | .................. 386 | ================== 387 | =======@@@@======= 388 | ======@++++@====== 389 | =====@++++++@===== 390 | ====@++@@@@++@==== 391 | ====@++@==@++@==== 392 | ====@++@==@++@==== 393 | ====@++@@@@++@==== 394 | =====@++++++@===== 395 | ======@++++@====== 396 | =======@@@@======= 397 | ================== 398 | '''.strip() 399 | stick_active_map = close_active_map 400 | stick_prelight = stick_active 401 | stick_prelight_map = hide_prelight_map 402 | stick_pressed = stick_active 403 | stick_pressed_map = hide_pressed_map 404 | stick_inactive = stick_active 405 | stick_inactive_map = menu_inactive_map 406 | 407 | #stick-toggled 408 | stick_toggled_active = ''' 409 | .................. 410 | .................. 411 | ================== 412 | =======@@@@======= 413 | ======@++++@====== 414 | =====@++++++@===== 415 | ====@++@@@@++@==== 416 | ====@++@++@++@==== 417 | ====@++@++@++@==== 418 | ====@++@@@@++@==== 419 | =====@++++++@===== 420 | ======@++++@====== 421 | =======@@@@======= 422 | ================== 423 | '''.strip() 424 | stick_toggled_active_map = close_active_map 425 | stick_toggled_prelight = stick_toggled_active 426 | stick_toggled_prelight_map = hide_prelight_map 427 | stick_toggled_pressed = stick_toggled_active 428 | stick_toggled_pressed_map = hide_pressed_map 429 | stick_toggled_inactive = stick_toggled_active 430 | stick_toggled_inactive_map = menu_inactive_map 431 | 432 | active = ''' 433 | ..+++++++++++.. 434 | .+%%%%%%%%%%%+. 435 | +%%%%%%%%%%%%%+ 436 | +%%%%%%%%%%%%%+ 437 | +%%%%%%%%%%%%%+ 438 | +%%%%%%%%%%%%%+ 439 | +%%%%%%%%%%%%%+ 440 | +%%%%%%%%%%%%%+ 441 | +%%%%%%%%%%%%%+ 442 | +%%%%%%%%%%%%%+ 443 | +%%%%%%%%%%%%%+ 444 | +%%%%%%%%%%%%%+ 445 | +%%%%%%%%%%%%%+ 446 | +%%%%%%%%%%%%%+ 447 | +%# #%+ 448 | +%###########%+ 449 | +%%%%%%%%%%%%%+ 450 | +%%%%%%%%%%%%%+ 451 | .+++++++++++++. 452 | '''.strip() 453 | amap = { 454 | "=" : "#000000 s active_color_2", 455 | "+" : "#000000 s active_shadow_2", 456 | "%" : "#000000 s active_color_2", 457 | "#" : "#000000 s active_color_2", 458 | "." : "None", 459 | } 460 | inactive = ''' 461 | ..+++++++++++.. 462 | .+%%%%%%%%%%%+. 463 | +%###########%+ 464 | +%#=========#%+ 465 | +%#=========#%+ 466 | +%#=========#%+ 467 | +%#=========#%+ 468 | +%#=========#%+ 469 | +%#=========#%+ 470 | +%#=========#%+ 471 | +%#=========#%+ 472 | +%#=========#%+ 473 | +%#=========#%+ 474 | +%#=========#%+ 475 | +%# #%+ 476 | +%###########%+ 477 | +%%%%%%%%%%%%%+ 478 | +%%%%%%%%%%%%%+ 479 | .+++++++++++++. 480 | '''.strip() 481 | imap = { 482 | "=" : "#000000 s inactive_color_2", 483 | "+" : "#000000 s inactive_shadow_2", 484 | "%" : "#000000 s inactive_color_2", 485 | "#" : "#000000 s inactive_color_2", 486 | "." : "None", 487 | } 488 | 489 | if __name__ == "__main__": 490 | build() 491 | -------------------------------------------------------------------------------- /themes/windowck/xfwm4/themerc: -------------------------------------------------------------------------------- 1 | button_offset=0 2 | button_spacing=0 3 | show_app_icon=false 4 | maximized_offset=0 5 | title_vertical_offset_active=1 6 | title_vertical_offset_inactive=1 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | --------------------------------------------------------------------------------