Permalink
Browse files

Added square brackets around the names of minimized windows

  • Loading branch information...
1 parent 9dbda5c commit 601374ac029adfcda0415b0995f0362b358e7dcf @test555 test555 committed Apr 14, 2017
View
1 data/default/panels/panel.in 100644 → 100755
@@ -106,6 +106,7 @@ Plugin {
ShowIconified=1
ShowMapped=1
ShowAllDesks=0
+ ShowSquareBrackets=1
UseMouseWheel=1
UseUrgencyHint=1
FlatButton=0
View
1 data/two_panels/panels/bottom.in 100644 → 100755
@@ -53,6 +53,7 @@ Plugin {
ShowIconified=1
ShowMapped=1
ShowAllDesks=0
+ ShowSquareBrackets=1
UseMouseWheel=1
UseUrgencyHint=1
FlatButton=0
View
30 data/ui/launchtaskbar.glade 100644 → 100755
@@ -323,6 +323,20 @@
<property name="position">3</property>
</packing>
</child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_show_square_brackets">
+ <property name="label" translatable="yes">Show square brackets around the names of minimized windows</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
<child>
<object class="GtkCheckButton" id="checkbutton_same_monitor_only">
<property name="label" translatable="yes">Only show windows on the same monitor as the task bar</property>
@@ -334,7 +348,7 @@
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">4</property>
+ <property name="position">5</property>
</packing>
</child>
<child>
@@ -348,7 +362,7 @@
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">5</property>
+ <property name="position">6</property>
</packing>
</child>
<child>
@@ -362,7 +376,7 @@
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">6</property>
+ <property name="position">7</property>
</packing>
</child>
<child>
@@ -376,7 +390,7 @@
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">7</property>
+ <property name="position">8</property>
</packing>
</child>
<child>
@@ -390,7 +404,7 @@
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">8</property>
+ <property name="position">9</property>
</packing>
</child>
<child>
@@ -404,7 +418,7 @@
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">9</property>
+ <property name="position">10</property>
</packing>
</child>
<child>
@@ -446,7 +460,7 @@
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">10</property>
+ <property name="position">11</property>
</packing>
</child>
<child>
@@ -488,7 +502,7 @@
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">11</property>
+ <property name="position">12</property>
</packing>
</child>
</object>
View
13 plugins/launchtaskbar.c 100644 → 100755
@@ -1009,6 +1009,8 @@ static void launchtaskbar_constructor_task(LaunchTaskBarPlugin *ltbp)
ltbp->flags.icons_only = (tmp_int != 0);
if (config_setting_lookup_int(s, "ShowAllDesks", &tmp_int))
ltbp->flags.show_all_desks = (tmp_int != 0);
+ if (config_setting_lookup_int(s, "ShowSquareBrackets", &tmp_int))
+ ltbp->flags.show_square_brackets = (tmp_int != 0);
if (config_setting_lookup_int(s, "SameMonitorOnly", &tmp_int))
ltbp->flags.same_monitor_only = (tmp_int != 0);
if (config_setting_lookup_int(s, "DisableUpscale", &tmp_int))
@@ -1105,6 +1107,7 @@ static GtkWidget *_launchtaskbar_constructor(LXPanel *panel, config_setting_t *s
ltbp->flags.tooltips = TRUE;
ltbp->flags.icons_only = FALSE;
ltbp->flags.show_all_desks = TRUE;
+ ltbp->flags.show_square_brackets = TRUE;
ltbp->task_width_max = TASK_WIDTH_MAX;
ltbp->spacing = 1;
ltbp->flags.use_mouse_wheel = TRUE;
@@ -1525,6 +1528,15 @@ static void on_checkbutton_show_all_desks_toggled(GtkToggleButton *p_togglebutto
taskbar_apply_configuration(ltbp);
}
+static void on_checkbutton_show_square_brackets_toggled(GtkToggleButton *p_togglebutton, gpointer p_data)
+{
+ LaunchTaskBarPlugin *ltbp = (LaunchTaskBarPlugin *)p_data;
+ ltbp->flags.show_square_brackets = gtk_toggle_button_get_active(p_togglebutton);
+ //g_print("\ntb->flags.show_square_brackets upd\n");
+ config_group_set_int(ltbp->settings, "ShowSquareBrackets", ltbp->flags.show_square_brackets);
+ taskbar_apply_configuration(ltbp);
+}
+
static void on_checkbutton_same_monitor_only_toggled(GtkToggleButton *p_togglebutton, gpointer p_data)
{
LaunchTaskBarPlugin *ltbp = (LaunchTaskBarPlugin *)p_data;
@@ -1784,6 +1796,7 @@ static GtkWidget *launchtaskbar_configure(LXPanel *panel, GtkWidget *p)
SETUP_TOGGLE_BUTTON(checkbutton_icons_only, icons_only);
SETUP_TOGGLE_BUTTON(checkbutton_flat_buttons, flat_button);
SETUP_TOGGLE_BUTTON(checkbutton_show_all_desks, show_all_desks);
+ SETUP_TOGGLE_BUTTON(checkbutton_show_square_brackets, show_square_brackets);
SETUP_TOGGLE_BUTTON(checkbutton_same_monitor_only, same_monitor_only);
SETUP_TOGGLE_BUTTON(checkbutton_mouse_wheel, use_mouse_wheel);
SETUP_TOGGLE_BUTTON(checkbutton_urgency_hint, use_urgency_hint);
View
30 plugins/task-button.c 100644 → 100755
@@ -1144,16 +1144,28 @@ static void task_draw_label(TaskButton *tb, gboolean bold_style, gboolean force)
tb->set_bold = bold_style;
str = g_string_sized_new(32);
- if (!tb->visible)
- g_string_append_c(str, '[');
- if (tb->n_visible > 1)
- g_string_append_printf(str, "(%d) ", tb->n_visible);
- if (!tb->same_name || !tb->last_focused || !tb->last_focused->name)
- g_string_append(str, tb->res_class);
+ if (tb->flags.show_square_brackets)
+ {
+ if (!tb->visible)
+ g_string_append_c(str, '[');
+ if (tb->n_visible > 1)
+ g_string_append_printf(str, "(%d) ", tb->n_visible);
+ if (!tb->same_name || !tb->last_focused || !tb->last_focused->name)
+ g_string_append(str, tb->res_class);
+ else
+ g_string_append(str, tb->last_focused->name);
+ if (!tb->visible)
+ g_string_append_c(str, ']');
+ }
else
- g_string_append(str, tb->last_focused->name);
- if (!tb->visible)
- g_string_append_c(str, ']');
+ {
+ if (tb->n_visible > 1)
+ g_string_append_printf(str, "(%d) ", tb->n_visible);
+ if (!tb->same_name || !tb->last_focused || !tb->last_focused->name)
+ g_string_append(str, tb->res_class);
+ else
+ g_string_append(str, tb->last_focused->name);
+ }
if (force && tb->flags.tooltips)
gtk_widget_set_tooltip_text(GTK_WIDGET(tb), str->str);
View
1 plugins/task-button.h 100644 → 100755
@@ -28,6 +28,7 @@ G_BEGIN_DECLS
typedef struct /* bitwise rendering options for taskbar */
{
gboolean show_all_desks : 1; /* show windows from all desktops */
+ gboolean show_square_brackets : 1; /* show square brackets around the names of minimized windows */
gboolean tooltips : 1; /* show tooltips */
gboolean icons_only : 1; /* show icons only, omit name */
gboolean use_mouse_wheel : 1; /* scroll wheel does iconify and raise */
View
26 po/ru.po 100644 → 100755
@@ -321,50 +321,54 @@ msgid "Show windows from all desktops"
msgstr "Показывать окна всех рабочих мест"
#: ../data/ui/launchtaskbar.glade.h:10
+msgid "Show square brackets around the names of minimized windows"
+msgstr "Показывать квадратные скобки вокруг названий свернутых окон"
+
+#: ../data/ui/launchtaskbar.glade.h:11
msgid "Only show windows on the same monitor as the task bar"
msgstr "Показывать только окна на том же мониторе, что и панель задач"
-#: ../data/ui/launchtaskbar.glade.h:11
+#: ../data/ui/launchtaskbar.glade.h:12
msgid "Use mouse wheel"
msgstr "Использовать колесо мыши"
-#: ../data/ui/launchtaskbar.glade.h:12
+#: ../data/ui/launchtaskbar.glade.h:13
msgid "Flash when there is any window requiring attention"
msgstr "Мигать, если окно требует внимания"
-#: ../data/ui/launchtaskbar.glade.h:13
+#: ../data/ui/launchtaskbar.glade.h:14
msgid "Combine multiple application windows into a single button"
msgstr "Сгруппировать несколько окон на одной кнопке"
-#: ../data/ui/launchtaskbar.glade.h:14
+#: ../data/ui/launchtaskbar.glade.h:15
msgid "Disable enlargement for small task icons"
msgstr "Запретить увеличение маленьких значков задач"
-#: ../data/ui/launchtaskbar.glade.h:15
+#: ../data/ui/launchtaskbar.glade.h:16
msgid "Show task icons smaller than rest of panel icons"
msgstr "Показывать значки задач меньшими, чем остальные значки панели"
-#: ../data/ui/launchtaskbar.glade.h:16
+#: ../data/ui/launchtaskbar.glade.h:17
msgid "Maximum width of task button"
msgstr "Макс. ширина кнопки окна"
-#: ../data/ui/launchtaskbar.glade.h:17
+#: ../data/ui/launchtaskbar.glade.h:18
msgid "Spacing"
msgstr "Разделитель"
-#: ../data/ui/launchtaskbar.glade.h:18
+#: ../data/ui/launchtaskbar.glade.h:19
msgid "<b>Taskbar</b>"
msgstr "<b>Панель задач</b>"
-#: ../data/ui/launchtaskbar.glade.h:19
+#: ../data/ui/launchtaskbar.glade.h:20
msgid "Only Application Launch Bar"
msgstr "Только панель запуска приложений"
-#: ../data/ui/launchtaskbar.glade.h:20
+#: ../data/ui/launchtaskbar.glade.h:21
msgid "Only Task Bar (Window List)"
msgstr "Только панель задач (Список окон)"
-#: ../data/ui/launchtaskbar.glade.h:21
+#: ../data/ui/launchtaskbar.glade.h:22
msgid "Integrated Application Launch Bar and Task Bar"
msgstr "Совмещённая панель запуска приложений и Панель задач"

0 comments on commit 601374a

Please sign in to comment.