[gedit/wip/redesign2: 5/13] Use show-close-button property
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/wip/redesign2: 5/13] Use show-close-button property
- Date: Thu, 26 Dec 2013 13:45:59 +0000 (UTC)
commit 650ced91f854697edaa884982ca0c9ec98cd2711
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Wed Nov 6 09:02:40 2013 +0100
Use show-close-button property
gedit/gedit-window-private.h | 1 -
gedit/gedit-window.c | 19 -------------------
gedit/gedit-window.ui | 31 +------------------------------
3 files changed, 1 insertions(+), 50 deletions(-)
---
diff --git a/gedit/gedit-window-private.h b/gedit/gedit-window-private.h
index 53b7f5f..1cb32b5 100644
--- a/gedit/gedit-window-private.h
+++ b/gedit/gedit-window-private.h
@@ -90,7 +90,6 @@ struct _GeditWindowPrivate
GtkWidget *headerbar;
GtkWidget *open_button;
GtkWidget *open_menu;
- GtkWidget *close_button;
/* recent files */
guint update_documents_list_menu_id;
diff --git a/gedit/gedit-window.c b/gedit/gedit-window.c
index 52b72d3..fbb05ab 100644
--- a/gedit/gedit-window.c
+++ b/gedit/gedit-window.c
@@ -430,7 +430,6 @@ gedit_window_class_init (GeditWindowClass *klass)
"/org/gnome/gedit/ui/gedit-window.ui");
gtk_widget_class_bind_template_child_private (widget_class, GeditWindow, headerbar);
gtk_widget_class_bind_template_child_private (widget_class, GeditWindow, open_menu);
- gtk_widget_class_bind_template_child_private (widget_class, GeditWindow, close_button);
gtk_widget_class_bind_template_child_private (widget_class, GeditWindow, hpaned);
gtk_widget_class_bind_template_child_private (widget_class, GeditWindow, side_panel);
gtk_widget_class_bind_template_child_private (widget_class, GeditWindow, vpaned);
@@ -3181,21 +3180,6 @@ static GActionEntry win_entries[] = {
};
static void
-on_window_close_button_clicked (GtkButton *button,
- GtkWidget *window)
-{
- GdkEvent *event;
-
- event = gdk_event_new (GDK_DELETE);
-
- event->any.window = g_object_ref (gtk_widget_get_window (window));
- event->any.send_event = TRUE;
-
- gtk_main_do_event (event);
- gdk_event_free (event);
-}
-
-static void
gedit_window_init (GeditWindow *window)
{
GtkTargetList *tl;
@@ -3237,9 +3221,6 @@ gedit_window_init (GeditWindow *window)
setup_headerbar_open_button (window);
- g_signal_connect (window->priv->close_button, "clicked",
- G_CALLBACK (on_window_close_button_clicked), window);
-
/* Setup status bar */
setup_statusbar (window);
diff --git a/gedit/gedit-window.ui b/gedit/gedit-window.ui
index 9a0e3a0..df8d0e1 100644
--- a/gedit/gedit-window.ui
+++ b/gedit/gedit-window.ui
@@ -70,6 +70,7 @@
<child type="titlebar">
<object class="GtkHeaderBar" id="headerbar">
<property name="visible">True</property>
+ <property name="show_close_button">True</property>
<child>
<object class="GtkBox" id="open_box">
<property name="visible">True</property>
@@ -165,36 +166,6 @@
<property name="pack_type">end</property>
</packing>
</child>
- <child>
- <object class="GtkSeparator" id="close_button_separator">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="valign">fill</property>
- </object>
- <packing>
- <property name="pack_type">end</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="close_button">
- <property name="visible">True</property>
- <property name="valign">center</property>
- <property name="relief">none</property>
- <style>
- <class name="image-button"/>
- </style>
- <child>
- <object class="GtkImage" id="close_image">
- <property name="visible">True</property>
- <property name="icon_size">1</property>
- <property name="icon_name">window-close-symbolic</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="pack_type">end</property>
- </packing>
- </child>
</object>
</child>
<child>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]