[eog] Use headerbar in properties dialog
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] Use headerbar in properties dialog
- Date: Wed, 21 Oct 2015 19:07:28 +0000 (UTC)
commit f8308117498e0a927c457d9f23b5a0484dda3eb9
Author: Trinh Anh Ngoc <atw1990 gmail com>
Date: Sun Sep 6 09:50:06 2015 +0700
Use headerbar in properties dialog
data/eog-image-properties-dialog.ui | 79 +++++++++++------------------------
src/eog-properties-dialog.c | 10 +----
2 files changed, 25 insertions(+), 64 deletions(-)
---
diff --git a/data/eog-image-properties-dialog.ui b/data/eog-image-properties-dialog.ui
index ac420c9..63d1e7f 100644
--- a/data/eog-image-properties-dialog.ui
+++ b/data/eog-image-properties-dialog.ui
@@ -5,95 +5,66 @@
<object class="GtkImage" id="next_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="icon_name">go-next</property>
+ <property name="icon_name">go-next-symbolic</property>
</object>
<object class="GtkImage" id="previous_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="icon_name">go-previous</property>
+ <property name="icon_name">go-previous-symbolic</property>
</object>
<template class="EogPropertiesDialog" parent="GtkDialog">
<property name="can_focus">False</property>
- <property name="border_width">5</property>
<property name="title" translatable="yes">Image Properties</property>
<property name="icon_name">gtk-properties</property>
<property name="type_hint">dialog</property>
- <child internal-child="vbox">
- <object class="GtkBox" id="image-properties-dialog-vbox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">2</property>
- <child internal-child="action_area">
- <object class="GtkButtonBox" id="dialog-action_area1">
+ <child internal-child="headerbar">
+ <object class="GtkHeaderBar">
+ <child>
+ <object class="GtkBox">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
+ <property name="orientation">horizontal</property>
+ <style>
+ <class name="linked"/>
+ </style>
<child>
<object class="GtkButton" id="previous_button">
- <property name="label" translatable="yes">_Previous</property>
+ <property name="tooltip_text" translatable="yes">Previous</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="image">previous_image</property>
- <property name="use_underline">True</property>
<property name="always_show_image">True</property>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
</child>
<child>
<object class="GtkButton" id="next_button">
- <property name="label" translatable="yes">_Next</property>
+ <property name="tooltip_text" translatable="yes">Next</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="image">next_image</property>
- <property name="use_underline">True</property>
<property name="always_show_image">True</property>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="close_button">
- <property name="label" translatable="yes">_Close</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
</child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
</child>
+ </object>
+ </child>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="image-properties-dialog-vbox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="border_width">0</property>
<child>
<object class="GtkNotebook" id="notebook">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="border_width">5</property>
+ <property name="show_border">False</property>
<signal name="switch-page" handler="eog_properties_dialog_page_switch"
object="EogPropertiesDialog" swapped="no"/>
<child>
<object class="GtkBox" id="general_box">
@@ -130,8 +101,8 @@
<object class="GtkGrid" id="general_grid">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_left">6</property>
- <property name="margin_right">6</property>
+ <property name="margin_start">6</property>
+ <property name="margin_end">6</property>
<property name="margin_top">6</property>
<property name="margin_bottom">6</property>
<property name="row_spacing">6</property>
@@ -891,9 +862,8 @@
</child>
</object>
<packing>
- <property name="expand">False</property>
+ <property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">1</property>
</packing>
</child>
</object>
@@ -901,7 +871,6 @@
<action-widgets>
<action-widget response="0">previous_button</action-widget>
<action-widget response="0">next_button</action-widget>
- <action-widget response="-7">close_button</action-widget>
</action-widgets>
</template>
</interface>
diff --git a/src/eog-properties-dialog.c b/src/eog-properties-dialog.c
index 8aef73c..be2ff63 100644
--- a/src/eog-properties-dialog.c
+++ b/src/eog-properties-dialog.c
@@ -66,7 +66,6 @@ struct _EogPropertiesDialogPrivate {
EogPropertiesDialogPage current_page;
GtkWidget *notebook;
- GtkWidget *close_button;
GtkWidget *next_button;
GtkWidget *previous_button;
@@ -657,9 +656,6 @@ eog_properties_dialog_class_init (EogPropertiesDialogClass *klass)
next_button);
gtk_widget_class_bind_template_child_private(wklass,
EogPropertiesDialog,
- close_button);
- gtk_widget_class_bind_template_child_private(wklass,
- EogPropertiesDialog,
thumbnail_image);
gtk_widget_class_bind_template_child_private(wklass,
EogPropertiesDialog,
@@ -776,11 +772,6 @@ eog_properties_dialog_init (EogPropertiesDialog *prop_dlg)
G_CALLBACK (gtk_widget_hide_on_delete),
prop_dlg);
- g_signal_connect_swapped (priv->close_button,
- "clicked",
- G_CALLBACK (gtk_widget_hide_on_delete),
- prop_dlg);
-
gtk_widget_set_tooltip_text (GTK_WIDGET (priv->folder_button),
_("Show the folder which contains this "
"file in the file manager"));
@@ -859,6 +850,7 @@ eog_properties_dialog_new (GtkWindow *parent,
"thumbview", thumbview,
"next-action", next_image_action,
"prev-action", previous_image_action,
+ "use-header-bar", TRUE,
NULL);
gtk_window_set_transient_for (GTK_WINDOW (prop_dlg), parent);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]