diff options
author | rbuj <[email protected]> | 2019-09-11 19:07:13 +0200 |
---|---|---|
committer | ZenWalker <[email protected]> | 2019-09-22 03:03:01 +0200 |
commit | 26b66b998b6d9286a3836835ef4b96aa64e0ed77 (patch) | |
tree | 638da5cd5014e03d4a1c9a98acf58429ffea4847 /src | |
parent | 45e722a0fe38e337307e370d42512ecd6fcbe34a (diff) | |
download | engrampa-26b66b998b6d9286a3836835ef4b96aa64e0ed77.tar.bz2 engrampa-26b66b998b6d9286a3836835ef4b96aa64e0ed77.tar.xz |
dlg-prop: set property label in ui file
Diffstat (limited to 'src')
-rw-r--r-- | src/dlg-prop.c | 41 | ||||
-rw-r--r-- | src/ui/properties.ui | 33 |
2 files changed, 32 insertions, 42 deletions
diff --git a/src/dlg-prop.c b/src/dlg-prop.c index 0c63dd4..5a42166 100644 --- a/src/dlg-prop.c +++ b/src/dlg-prop.c @@ -46,24 +46,6 @@ destroy_cb (GtkWidget *widget, } -static void -set_label_type (GtkWidget *label, const char *text, const char *type) -{ - char *t; - - t = g_strdup_printf ("<%s>%s</%s>", type, text, type); - gtk_label_set_markup (GTK_LABEL (label), t); - g_free (t); -} - - -static void -set_label (GtkWidget *label, const char *text) -{ - set_label_type (label, text, "b"); -} - - static int help_cb (GtkWidget *w, DialogData *data) @@ -79,7 +61,6 @@ dlg_prop (FrWindow *window) DialogData *data; GtkWidget *ok_button; GtkWidget *help_button; - GtkWidget *label_label; GtkWidget *label; GFile *parent; char *uri; @@ -106,10 +87,6 @@ dlg_prop (FrWindow *window) /* Set widgets data. */ - label_label = _gtk_builder_get_widget (data->builder, "p_path_label_label"); - /* Translators: after the colon there is a folder name. */ - set_label (label_label, _("Location:")); - label = _gtk_builder_get_widget (data->builder, "p_path_label"); uri = remove_level_from_path (fr_window_get_archive_uri (window)); parent = g_file_new_for_uri (uri); @@ -124,9 +101,6 @@ dlg_prop (FrWindow *window) /**/ - label_label = _gtk_builder_get_widget (data->builder, "p_name_label_label"); - set_label (label_label, C_("File", "Name:")); - label = _gtk_builder_get_widget (data->builder, "p_name_label"); utf8_name = g_uri_display_basename (fr_window_get_archive_uri (window)); gtk_label_set_text (GTK_LABEL (label), utf8_name); @@ -139,9 +113,6 @@ dlg_prop (FrWindow *window) /**/ - label_label = _gtk_builder_get_widget (data->builder, "p_date_label_label"); - set_label (label_label, _("Last modified:")); - label = _gtk_builder_get_widget (data->builder, "p_date_label"); GDateTime *date_time; date_time = g_date_time_new_from_unix_local (get_file_mtime (fr_window_get_archive_uri (window))); @@ -152,9 +123,6 @@ dlg_prop (FrWindow *window) /**/ - label_label = _gtk_builder_get_widget (data->builder, "p_size_label_label"); - set_label (label_label, _("Archive size:")); - label = _gtk_builder_get_widget (data->builder, "p_size_label"); size = get_file_size (fr_window_get_archive_uri (window)); s = g_format_size_full (size, G_FORMAT_SIZE_LONG_FORMAT); @@ -163,9 +131,6 @@ dlg_prop (FrWindow *window) /**/ - label_label = _gtk_builder_get_widget (data->builder, "p_uncomp_size_label_label"); - set_label (label_label, _("Content size:")); - uncompressed_size = 0; if (fr_window_archive_is_present (window)) { guint i; @@ -183,9 +148,6 @@ dlg_prop (FrWindow *window) /**/ - label_label = _gtk_builder_get_widget (data->builder, "p_cratio_label_label"); - set_label (label_label, _("Compression ratio:")); - label = _gtk_builder_get_widget (data->builder, "p_cratio_label"); if (uncompressed_size != 0) @@ -198,9 +160,6 @@ dlg_prop (FrWindow *window) /**/ - label_label = _gtk_builder_get_widget (data->builder, "p_files_label_label"); - set_label (label_label, _("Number of files:")); - label = _gtk_builder_get_widget (data->builder, "p_files_label"); s = g_strdup_printf ("%d", window->archive->command->n_regular_files); gtk_label_set_text (GTK_LABEL (label), s); diff --git a/src/ui/properties.ui b/src/ui/properties.ui index 4804d0f..99eae7d 100644 --- a/src/ui/properties.ui +++ b/src/ui/properties.ui @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.20.0 --> +<!-- Generated with glade 3.22.1 --> <interface> <requires lib="gtk+" version="3.14"/> <object class="GtkDialog" id="prop_dialog"> @@ -7,6 +7,9 @@ <property name="border_width">5</property> <property name="window_position">center-on-parent</property> <property name="type_hint">dialog</property> + <child> + <placeholder/> + </child> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox12"> <property name="visible">True</property> @@ -71,7 +74,11 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="halign">start</property> + <property name="label" translatable="yes" context="File">Name:</property> <property name="justify">center</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> </object> <packing> <property name="left_attach">0</property> @@ -83,7 +90,11 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="halign">start</property> + <property name="label" translatable="yes">Archive size:</property> <property name="justify">center</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> </object> <packing> <property name="left_attach">0</property> @@ -119,6 +130,10 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="halign">start</property> + <property name="label" translatable="yes">Compression ratio:</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> </object> <packing> <property name="left_attach">0</property> @@ -142,6 +157,10 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="halign">start</property> + <property name="label" translatable="yes">Content size:</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> </object> <packing> <property name="left_attach">0</property> @@ -177,7 +196,11 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="halign">start</property> + <property name="label" translatable="yes">Number of files:</property> <property name="justify">center</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> </object> <packing> <property name="left_attach">0</property> @@ -215,7 +238,11 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="halign">start</property> + <property name="label" translatable="yes">Location:</property> <property name="justify">center</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> </object> <packing> <property name="left_attach">0</property> @@ -227,7 +254,11 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="halign">start</property> + <property name="label" translatable="yes">Last modified:</property> <property name="justify">center</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> </object> <packing> <property name="left_attach">0</property> |