Tooltip changes

pull/104/head
parent ccdf51826b
commit 110b3db8eb

@ -1492,7 +1492,7 @@ void* yon_interface_update(main_window *widgets){
int active = !strcmp(parsed[2],"active");
enum YON_UNIT_TYPE type = yon_get_unit_type(names_parsed[j]);
gtk_list_store_append(widgets->SystemList,&iter);
gtk_list_store_set(widgets->SystemList,&iter,3,enabled,4,active,5,names_parsed[j],6,parsed[4],7,type,8,active,9,loaded,11,_(parsed[3]),13,parsed[3],-1);
gtk_list_store_set(widgets->SystemList,&iter,3,enabled,4,active,5,names_parsed[j],6,parsed[4],7,type,8,active,9,loaded,11,_(parsed[3]),13,parsed[3],14,parsed[1],15,parsed[2],-1);
}
}
yon_char_parsed_free(names_parsed,names_size);
@ -1524,7 +1524,7 @@ void* yon_interface_update(main_window *widgets){
int active = !strcmp(parsed[2],"active");
enum YON_UNIT_TYPE type = yon_get_unit_type(names_parsed[j]);
gtk_list_store_append(widgets->UserList,&iter);
gtk_list_store_set(widgets->UserList,&iter,3,enabled,4,active,5,names_parsed[j],6,parsed[4],7,type,8,active,9,loaded,11,_(parsed[3]),13,parsed[3],-1);
gtk_list_store_set(widgets->UserList,&iter,3,enabled,4,active,5,names_parsed[j],6,parsed[4],7,type,8,active,9,loaded,11,_(parsed[3]),13,parsed[3],14,parsed[1],15,parsed[2],-1);
}
}
yon_char_parsed_free(names_parsed,names_size);
@ -1797,9 +1797,9 @@ gboolean on_tooltip_show(GtkWidget*, gint x, gint y, gboolean, GtkTooltip* toolt
if (gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(tree), tree_x, tree_y, &path, NULL, NULL, NULL)) {
GtkTreeIter iter;
if (gtk_tree_model_get_iter(model, &iter, path)) {
gchar *name, *description, *state, *name_target;
gchar *name, *description, *state, *name_target, *load_status, *active_status;
int size;
gtk_tree_model_get(model, &iter, 5, &name, 6, &description, 11, &state, -1);
gtk_tree_model_get(model, &iter, 5, &name, 6, &description, 11, &state, 14,&load_status,15,&active_status, -1);
name_target = yon_char_new(name);
if (name[0]=='-'){
name_target = yon_char_append("-- ",name_target);
@ -1815,9 +1815,14 @@ gboolean on_tooltip_show(GtkWidget*, gint x, gint y, gboolean, GtkTooltip* toolt
yon_char_remove_last_symbol(target[2], '\n');
gtk_label_set_text(GTK_LABEL(widgets->UnitLabel), target[0]);
}
gtk_label_set_text(GTK_LABEL(widgets->NameLabel), name);
gtk_label_set_text(GTK_LABEL(widgets->DescriptionLabel), description);
gtk_label_set_text(GTK_LABEL(widgets->StatusQueryLabel), state);
gtk_label_set_text(GTK_LABEL(widgets->AutostartLabel), _(load_status));
gtk_label_set_text(GTK_LABEL(widgets->TooltipStatusLabel), _(active_status));
free(name);
free(description);
@ -1911,6 +1916,8 @@ void yon_main_window_complete(main_window *widgets){
widgets->StatusQueryLabel=yon_gtk_builder_get_widget(builder,"StatusQueryLabel");
widgets->ActivateLabel=yon_gtk_builder_get_widget(builder,"ActivateLabel");
widgets->DeactivateLabel=yon_gtk_builder_get_widget(builder,"DeactivateLabel");
widgets->AutostartLabel=yon_gtk_builder_get_widget(builder,"AutostartLabel");
widgets->TooltipStatusLabel=yon_gtk_builder_get_widget(builder,"StatusLabel");
widgets->SystemServicesStatusMenuItem=yon_gtk_builder_get_widget(builder,"SystemServicesStatusMenuItem");
widgets->InstalledUnitsStatusMenuItem=yon_gtk_builder_get_widget(builder,"InstalledUnitsStatusMenuItem");

@ -267,6 +267,8 @@ typedef struct {
rmb_menu_window *UserMenu;
GtkWidget *UserServiceLabel;
GtkWidget *UserDescriptionLabel;
GtkWidget *AutostartLabel;
GtkWidget *TooltipStatusLabel;
GtkWidget *ConfigEditButton;
GtkWidget *ConfigUpdateButton;

@ -177,4 +177,8 @@
#define ACTIVATED_LABEL _("Activated:")
#define DEACTIVATED_LABEL _("Deactivated:")
#define service_tooltip_template(target,description,unit,status,activated,deactivated) yon_char_unite("<u>",target,"</u>\n",_("Description:"),description,"\n",_("Unit file:"),unit,"\n",_("Status:"),status,"\n",_("Activated:"),activated,"\n",_("Deactivated:"),deactivated,NULL)
#define service_tooltip_template(target,description,unit,status,activated,deactivated) yon_char_unite("<u>",target,"</u>\n",_("Description:"),description,"\n",_("Unit file:"),unit,"\n",_("Status:"),status,"\n",_("Activated:"),activated,"\n",_("Deactivated:"),deactivated,NULL)
#define LOADED_STATUS_LABEL _("loaded")
#define INACTIVE_STATUS_LABEL _("inactive")
#define NOT_FOUND_STATUS_LABEL _("not-found")
#define MASKED_STATUS_LABEL _("masked")

@ -69,6 +69,10 @@
<column type="gchararray"/>
<!-- column-name UnitStateUnlocalised -->
<column type="gchararray"/>
<!-- column-name AciveStatus -->
<column type="gchararray"/>
<!-- column-name WorkStatus -->
<column type="gchararray"/>
</columns>
</object>
<object class="GtkTreeModelFilter" id="SystemFilter">
@ -205,7 +209,7 @@
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Unit file:</property>
<property name="label" translatable="yes">Autostart:</property>
</object>
<packing>
<property name="expand">False</property>
@ -214,10 +218,10 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="UnitLabel">
<object class="GtkLabel" id="AutostartLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Unit file:</property>
<property name="label" translatable="yes">Autostart</property>
<property name="single-line-mode">True</property>
<property name="xalign">0</property>
</object>
@ -272,6 +276,82 @@
<property name="position">4</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">5</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Status:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="StatusLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Unit file state:</property>
<property name="single-line-mode">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">5</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">5</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Unit file:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="UnitLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Unit file:</property>
<property name="single-line-mode">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">6</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
@ -307,7 +387,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">5</property>
<property name="position">7</property>
</packing>
</child>
<child>
@ -345,7 +425,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">6</property>
<property name="position">8</property>
</packing>
</child>
</object>
@ -379,6 +459,10 @@
<column type="gchararray"/>
<!-- column-name UnitStateUnlocalised -->
<column type="gchararray"/>
<!-- column-name gchararray1 -->
<column type="gchararray"/>
<!-- column-name gchararray2 -->
<column type="gchararray"/>
</columns>
</object>
<object class="GtkTreeModelFilter" id="UserFilter">

@ -586,3 +586,19 @@ msgstr ""
#: source/ubl-strings.h:180
msgid "Status:"
msgstr ""
#: source/ubl-strings.h:180
msgid "loaded"
msgstr ""
#: source/ubl-strings.h:180
msgid "inactive"
msgstr ""
#: source/ubl-strings.h:180
msgid "not-found"
msgstr ""
#: source/ubl-strings.h:180
msgid "masked"
msgstr ""

@ -665,3 +665,19 @@ msgstr "Файл конфигурации, управляющий синхрон
msgid "Unit log"
msgstr "Лог юнита"
#: source/ubl-strings.h:180
msgid "loaded"
msgstr "включен"
#: source/ubl-strings.h:180
msgid "inactive"
msgstr "неактивен"
#: source/ubl-strings.h:180
msgid "not-found"
msgstr "вылючен"
#: source/ubl-strings.h:180
msgid "masked"
msgstr "выключен"
Loading…
Cancel
Save