[gnome-multi-writer] Remove the AppMenu



commit eda925d0aba73d1d5ee03d32bbdaefa3e735e2b1
Author: Richard Hughes <richard hughsie com>
Date:   Thu Nov 1 11:10:16 2018 +0000

    Remove the AppMenu

 src/gmw-main.c                       | 12 ++++++++++++
 src/gmw-main.ui                      | 24 ++++++++++++++++++++----
 src/gmw-menus.ui                     | 23 -----------------------
 src/gnome-multi-writer.gresource.xml |  1 -
 4 files changed, 32 insertions(+), 28 deletions(-)
---
diff --git a/src/gmw-main.c b/src/gmw-main.c
index e167fb0..56cf17c 100644
--- a/src/gmw-main.c
+++ b/src/gmw-main.c
@@ -66,6 +66,9 @@ typedef struct {
        GtkWidget               *switch_probe;
 } GmwPrivate;
 
+
+static void     gmw_import_filename    (GmwPrivate     *priv);
+
 static void
 gmw_error_dialog (GmwPrivate *priv, const gchar *title, const gchar *message)
 {
@@ -98,6 +101,12 @@ gmw_cancel_clicked_cb (GtkWidget *widget, GmwPrivate *priv)
        g_cancellable_cancel (priv->cancellable);
 }
 
+static void
+gmw_import_clicked_cb (GtkWidget *widget, GmwPrivate *priv)
+{
+       gmw_import_filename (priv);
+}
+
 static gint
 gmw_devices_sort_cb (gconstpointer a, gconstpointer b)
 {
@@ -1383,6 +1392,9 @@ gmw_startup_cb (GApplication *application, GmwPrivate *priv)
        w = GTK_WIDGET (gtk_builder_get_object (priv->builder, "button_cancel"));
        g_signal_connect (w, "clicked",
                          G_CALLBACK (gmw_cancel_clicked_cb), priv);
+       w = GTK_WIDGET (gtk_builder_get_object (priv->builder, "button_import"));
+       g_signal_connect (w, "clicked",
+                         G_CALLBACK (gmw_import_clicked_cb), priv);
 
        /* setup USB image */
        w = GTK_WIDGET (gtk_builder_get_object (priv->builder, "image_usb"));
diff --git a/src/gmw-main.ui b/src/gmw-main.ui
index 7f7543f..c02f11b 100644
--- a/src/gmw-main.ui
+++ b/src/gmw-main.ui
@@ -130,17 +130,33 @@
             <property name="receives_default">True</property>
             <property name="halign">end</property>
             <child>
-              <object class="GtkImage" id="image_settings">
+              <object class="GtkImage">
                 <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="pixel_size">22</property>
                 <property name="icon_name">open-menu-symbolic</property>
+                <property name="icon_size">1</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="pack_type">end</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="button_import">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="halign">end</property>
+            <child>
+              <object class="GtkImage">
+                <property name="visible">True</property>
+                <property name="icon_name">document-open-symbolic</property>
+                <property name="icon_size">1</property>
               </object>
             </child>
           </object>
           <packing>
             <property name="pack_type">end</property>
-            <property name="position">3</property>
           </packing>
         </child>
       </object>
diff --git a/src/gnome-multi-writer.gresource.xml b/src/gnome-multi-writer.gresource.xml
index c8da38b..8f54a4d 100644
--- a/src/gnome-multi-writer.gresource.xml
+++ b/src/gnome-multi-writer.gresource.xml
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <gresources>
  <gresource prefix="/org/gnome/MultiWriter">
-  <file compressed="true" alias="gtk/menus.ui">gmw-menus.ui</file>
   <file compressed="true">gmw-main.ui</file>
   <file compressed="true" alias="usb-symbolic.svg">usb.svg</file>
  </gresource>


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