[gnome-color-manager] viewer: get rid of the single close button



commit ad424a7dbfbd0c8f523e009f2f814c591f733f53
Author: Richard Hughes <richard hughsie com>
Date:   Fri Mar 25 14:46:59 2011 +0000

    viewer: get rid of the single close button

 data/gcm-viewer.ui |   34 ++--------------------------------
 src/gcm-viewer.c   |   14 +-------------
 2 files changed, 3 insertions(+), 45 deletions(-)
---
diff --git a/data/gcm-viewer.ui b/data/gcm-viewer.ui
index 609fa1f..6d4486a 100644
--- a/data/gcm-viewer.ui
+++ b/data/gcm-viewer.ui
@@ -1,43 +1,17 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <requires lib="gtk+" version="2.16"/>
-  <object class="GtkDialog" id="dialog_viewer">
+  <object class="GtkWindow" id="dialog_viewer">
     <property name="can_focus">False</property>
     <property name="border_width">5</property>
     <property name="title" translatable="yes">Color Profile Viewer</property>
     <property name="window_position">center-always</property>
-    <property name="type_hint">dialog</property>
-    <child internal-child="vbox">
+    <child>
       <object class="GtkBox" id="dialog-vbox1">
         <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_area">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="button_close">
-                <property name="label">gtk-close</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="has_tooltip">True</property>
-                <property name="tooltip_markup" translatable="yes">Close this dialog</property>
-                <property name="tooltip_text" translatable="yes">Close this dialog</property>
-                <property name="use_action_appearance">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-          </object>
-        </child>
         <child>
           <object class="GtkHBox" id="hbox5">
             <property name="visible">True</property>
@@ -1321,9 +1295,6 @@
         </child>
       </object>
     </child>
-    <action-widgets>
-      <action-widget response="0">button_close</action-widget>
-    </action-widgets>
   </object>
   <object class="GtkSizeGroup" id="sizegroup_profiles">
     <widgets>
@@ -1336,7 +1307,6 @@
       <widget name="hbox36"/>
       <widget name="hbox39"/>
       <widget name="hbox6"/>
-      <widget name="hbox19"/>
       <widget name="hbox1"/>
       <widget name="hbox6"/>
       <widget name="hbox39"/>
diff --git a/src/gcm-viewer.c b/src/gcm-viewer.c
index 90f3ea5..5de2abc 100644
--- a/src/gcm-viewer.c
+++ b/src/gcm-viewer.c
@@ -100,15 +100,6 @@ gcm_viewer_error_dialog (GcmViewerPrivate *viewer, const gchar *title, const gch
 }
 
 /**
- * gcm_viewer_close_cb:
- **/
-static void
-gcm_viewer_close_cb (GtkWidget *widget, GcmViewerPrivate *viewer)
-{
-	g_application_release (G_APPLICATION (viewer->application));
-}
-
-/**
  * gcm_viewer_set_example_image:
  **/
 static void
@@ -152,7 +143,7 @@ gcm_viewer_image_prev_cb (GtkWidget *widget, GcmViewerPrivate *viewer)
 static gboolean
 gcm_viewer_delete_event_cb (GtkWidget *widget, GdkEvent *event, GcmViewerPrivate *viewer)
 {
-	gcm_viewer_close_cb (widget, viewer);
+	g_application_release (G_APPLICATION (viewer->application));
 	return FALSE;
 }
 
@@ -1030,9 +1021,6 @@ gcm_viewer_startup_cb (GApplication *application, GcmViewerPrivate *viewer)
 			  G_CALLBACK (gcm_viewer_drag_data_received_cb), viewer);
 	gcm_viewer_setup_drag_and_drop (GTK_WIDGET(main_window));
 
-	widget = GTK_WIDGET (gtk_builder_get_object (viewer->builder, "button_close"));
-	g_signal_connect (widget, "clicked",
-			  G_CALLBACK (gcm_viewer_close_cb), viewer);
 	widget = GTK_WIDGET (gtk_builder_get_object (viewer->builder, "button_profile_delete"));
 	g_signal_connect (widget, "clicked",
 			  G_CALLBACK (gcm_viewer_profile_delete_cb), viewer);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]