[gnome-software] Use the new-style progress UI



commit 3ac876f669b8070c3ad5e6b96b92a9bbd7bf859f
Author: Richard Hughes <richard hughsie com>
Date:   Fri Jul 8 21:11:08 2016 +0100

    Use the new-style progress UI

 src/gs-shell-details.c  |  131 +++++++++++-------
 src/gs-shell-details.ui |  342 +++++++++++++++++++++++++++-------------------
 2 files changed, 282 insertions(+), 191 deletions(-)
---
diff --git a/src/gs-shell-details.c b/src/gs-shell-details.c
index 48fd972..95b2a11 100644
--- a/src/gs-shell-details.c
+++ b/src/gs-shell-details.c
@@ -33,7 +33,6 @@
 #include "gs-auth-dialog.h"
 #include "gs-history-dialog.h"
 #include "gs-screenshot-image.h"
-#include "gs-progress-button.h"
 #include "gs-star-widget.h"
 #include "gs-review-histogram.h"
 #include "gs-review-dialog.h"
@@ -69,6 +68,7 @@ struct _GsShellDetails
        GtkWidget               *box_addons;
        GtkWidget               *box_details;
        GtkWidget               *box_details_description;
+       GtkWidget               *box_progress;
        GtkWidget               *star;
        GtkWidget               *label_review_count;
        GtkWidget               *box_details_screenshot;
@@ -86,6 +86,8 @@ struct _GsShellDetails
        GtkWidget               *infobar_details_app_repo;
        GtkWidget               *infobar_details_package_baseos;
        GtkWidget               *infobar_details_repo;
+       GtkWidget               *label_progress_percentage;
+       GtkWidget               *label_progress_status;
        GtkWidget               *label_addons_uninstalled_app;
        GtkWidget               *label_details_category_title;
        GtkWidget               *label_details_category_value;
@@ -114,7 +116,7 @@ struct _GsShellDetails
        GtkWidget               *list_box_reviews;
        GtkWidget               *scrolledwindow_details;
        GtkWidget               *spinner_details;
-       GtkWidget               *spinner_install_remove;
+       GtkWidget               *spinner_remove;
        GtkWidget               *stack_details;
        GtkWidget               *grid_details_kudo;
        GtkWidget               *image_details_kudo_docs;
@@ -127,6 +129,7 @@ struct _GsShellDetails
        GtkWidget               *label_details_kudo_integration;
        GtkWidget               *label_details_kudo_translated;
        GtkWidget               *label_details_kudo_updated;
+       GtkWidget               *progressbar_top;
 };
 
 G_DEFINE_TYPE (GsShellDetails, gs_shell_details, GS_TYPE_PAGE)
@@ -254,7 +257,6 @@ gs_shell_details_switch_to (GsPage *page, gboolean scroll_up)
        case AS_APP_STATE_AVAILABLE:
        case AS_APP_STATE_AVAILABLE_LOCAL:
                gtk_widget_set_visible (self->button_install, TRUE);
-               gtk_widget_set_sensitive (self->button_install, TRUE);
                gtk_style_context_add_class (gtk_widget_get_style_context (self->button_install), 
"suggested-action");
                /* TRANSLATORS: button text in the header when an application
                 * can be installed */
@@ -264,12 +266,7 @@ gs_shell_details_switch_to (GsPage *page, gboolean scroll_up)
                gtk_widget_set_visible (self->button_install, FALSE);
                break;
        case AS_APP_STATE_INSTALLING:
-               gtk_widget_set_visible (self->button_install, TRUE);
-               gtk_widget_set_sensitive (self->button_install, FALSE);
-               gtk_style_context_remove_class (gtk_widget_get_style_context (self->button_install), 
"suggested-action");
-               /* TRANSLATORS: button text in the header when an application
-                * is in the process of being installed */
-               gtk_button_set_label (GTK_BUTTON (self->button_install), _("_Installing"));
+               gtk_widget_set_visible (self->button_install, FALSE);
                break;
        case AS_APP_STATE_UNKNOWN:
        case AS_APP_STATE_INSTALLED:
@@ -279,7 +276,6 @@ gs_shell_details_switch_to (GsPage *page, gboolean scroll_up)
                break;
        case AS_APP_STATE_UPDATABLE_LIVE:
                gtk_widget_set_visible (self->button_install, TRUE);
-               gtk_widget_set_sensitive (self->button_install, TRUE);
                sc = gtk_widget_get_style_context (self->button_install);
                if (gs_app_get_kind (self->app) == AS_APP_KIND_FIRMWARE) {
                        /* TRANSLATORS: button text in the header when firmware
@@ -378,71 +374,99 @@ gs_shell_details_switch_to (GsPage *page, gboolean scroll_up)
                }
        }
 
+       adj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (self->scrolledwindow_details));
+       gtk_adjustment_set_value (adj, gtk_adjustment_get_lower (adj));
+
+       gs_grab_focus_when_mapped (self->scrolledwindow_details);
+}
+
+static void
+gs_shell_details_refresh_progress (GsShellDetails *self)
+{
+       guint percentage;
+       AsAppState state;
+
        /* cancel button */
+       state = gs_app_get_state (self->app);
        switch (state) {
-       case AS_APP_STATE_REMOVING:
        case AS_APP_STATE_INSTALLING:
                gtk_widget_set_visible (self->button_cancel, TRUE);
-               gtk_widget_set_sensitive (self->button_cancel, TRUE);
+               gtk_widget_set_sensitive (self->button_cancel,
+                                         !g_cancellable_is_cancelled (self->cancellable));
                break;
        default:
                gtk_widget_set_visible (self->button_cancel, FALSE);
                break;
        }
 
-       /* do a fill bar for the current progress */
-       switch (gs_app_get_state (self->app)) {
+       /* progress status label */
+       switch (state) {
+       case AS_APP_STATE_REMOVING:
+               gtk_widget_set_visible (self->label_progress_status, TRUE);
+               gtk_label_set_label (GTK_LABEL (self->label_progress_status),
+                                    _("Removing…"));
+               break;
        case AS_APP_STATE_INSTALLING:
-               gs_progress_button_set_show_progress (GS_PROGRESS_BUTTON (self->button_install), TRUE);
+               gtk_widget_set_visible (self->label_progress_status, TRUE);
+               gtk_label_set_label (GTK_LABEL (self->label_progress_status),
+                                    _("Installing"));
                break;
        default:
-               gs_progress_button_set_show_progress (GS_PROGRESS_BUTTON (self->button_install), FALSE);
+               gtk_widget_set_visible (self->label_progress_status, FALSE);
                break;
        }
 
-       /* spinner */
-       if (gs_app_has_quirk (self->app, AS_APP_QUIRK_COMPULSORY)) {
-               gtk_widget_set_visible (self->spinner_install_remove, FALSE);
-               gtk_spinner_stop (GTK_SPINNER (self->spinner_install_remove));
-       } else {
-               switch (state) {
-               case AS_APP_STATE_UNKNOWN:
-               case AS_APP_STATE_INSTALLED:
-               case AS_APP_STATE_AVAILABLE:
-               case AS_APP_STATE_QUEUED_FOR_INSTALL:
-               case AS_APP_STATE_UPDATABLE:
-               case AS_APP_STATE_UPDATABLE_LIVE:
-               case AS_APP_STATE_UNAVAILABLE:
-               case AS_APP_STATE_AVAILABLE_LOCAL:
-               case AS_APP_STATE_INSTALLING:
-                       gtk_widget_set_visible (self->spinner_install_remove, FALSE);
-                       gtk_spinner_stop (GTK_SPINNER (self->spinner_install_remove));
-                       break;
-               case AS_APP_STATE_REMOVING:
-                       gtk_spinner_start (GTK_SPINNER (self->spinner_install_remove));
-                       gtk_widget_set_visible (self->spinner_install_remove, TRUE);
-                       break;
-               default:
-                       g_warning ("App unexpectedly in state %s",
-                                  as_app_state_to_string (state));
-                       g_assert_not_reached ();
+       /* percentage bar */
+       switch (state) {
+       case AS_APP_STATE_INSTALLING:
+               percentage = gs_app_get_progress (self->app);
+               if (percentage > 0) {
+                       gtk_widget_set_visible (self->label_progress_percentage, FALSE);
+                       gtk_widget_set_visible (self->progressbar_top, FALSE);
+               } else {
+                       g_autofree gchar *str = g_strdup_printf ("%i%%", percentage);
+                       gtk_label_set_label (GTK_LABEL (self->label_progress_percentage), str);
+                       gtk_widget_set_visible (self->label_progress_percentage, TRUE);
+                       gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (self->progressbar_top),
+                                                      (gdouble) percentage / 100.f);
+                       gtk_widget_set_visible (self->progressbar_top, TRUE);
                }
+               break;
+       default:
+               gtk_widget_set_visible (self->label_progress_percentage, FALSE);
+               gtk_widget_set_visible (self->progressbar_top, FALSE);
+               break;
        }
 
-       adj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (self->scrolledwindow_details));
-       gtk_adjustment_set_value (adj, gtk_adjustment_get_lower (adj));
+       /* spinner */
+       switch (state) {
+       case AS_APP_STATE_REMOVING:
+               gtk_spinner_start (GTK_SPINNER (self->spinner_remove));
+               gtk_widget_set_visible (self->spinner_remove, TRUE);
+               break;
+       default:
+               gtk_widget_set_visible (self->spinner_remove, FALSE);
+               gtk_spinner_stop (GTK_SPINNER (self->spinner_remove));
+               break;
+       }
 
-       gs_grab_focus_when_mapped (self->scrolledwindow_details);
+       /* progress box */
+       switch (state) {
+       case AS_APP_STATE_REMOVING:
+       case AS_APP_STATE_INSTALLING:
+               gtk_widget_set_visible (self->box_progress, TRUE);
+               break;
+       default:
+               gtk_widget_set_visible (self->box_progress, FALSE);
+               break;
+       }
 }
 
 static gboolean
 gs_shell_details_refresh_progress_idle (gpointer user_data)
 {
        GsShellDetails *self = GS_SHELL_DETAILS (user_data);
-
-       gs_progress_button_set_progress (GS_PROGRESS_BUTTON (self->button_install),
-                                        gs_app_get_progress (self->app));
-
+       gs_shell_details_refresh_progress (self);
        g_object_unref (self);
        return G_SOURCE_REMOVE;
 }
@@ -1098,6 +1122,9 @@ gs_shell_details_refresh_all (GsShellDetails *self)
 
        gs_shell_details_update_shortcut_button (self);
 
+       /* update progress */
+       gs_shell_details_refresh_progress (self);
+
        addons = gtk_container_get_children (GTK_CONTAINER (self->list_box_addons));
        gtk_widget_set_visible (self->box_addons, addons != NULL);
        g_list_free (addons);
@@ -1888,6 +1915,7 @@ gs_shell_details_class_init (GsShellDetailsClass *klass)
        gtk_widget_class_bind_template_child (widget_class, GsShellDetails, box_addons);
        gtk_widget_class_bind_template_child (widget_class, GsShellDetails, box_details);
        gtk_widget_class_bind_template_child (widget_class, GsShellDetails, box_details_description);
+       gtk_widget_class_bind_template_child (widget_class, GsShellDetails, box_progress);
        gtk_widget_class_bind_template_child (widget_class, GsShellDetails, star);
        gtk_widget_class_bind_template_child (widget_class, GsShellDetails, label_review_count);
        gtk_widget_class_bind_template_child (widget_class, GsShellDetails, box_details_screenshot);
@@ -1906,6 +1934,8 @@ gs_shell_details_class_init (GsShellDetailsClass *klass)
        gtk_widget_class_bind_template_child (widget_class, GsShellDetails, infobar_details_package_baseos);
        gtk_widget_class_bind_template_child (widget_class, GsShellDetails, infobar_details_repo);
        gtk_widget_class_bind_template_child (widget_class, GsShellDetails, label_addons_uninstalled_app);
+       gtk_widget_class_bind_template_child (widget_class, GsShellDetails, label_progress_percentage);
+       gtk_widget_class_bind_template_child (widget_class, GsShellDetails, label_progress_status);
        gtk_widget_class_bind_template_child (widget_class, GsShellDetails, label_details_category_title);
        gtk_widget_class_bind_template_child (widget_class, GsShellDetails, label_details_category_value);
        gtk_widget_class_bind_template_child (widget_class, GsShellDetails, label_details_developer_title);
@@ -1933,7 +1963,7 @@ gs_shell_details_class_init (GsShellDetailsClass *klass)
        gtk_widget_class_bind_template_child (widget_class, GsShellDetails, list_box_reviews);
        gtk_widget_class_bind_template_child (widget_class, GsShellDetails, scrolledwindow_details);
        gtk_widget_class_bind_template_child (widget_class, GsShellDetails, spinner_details);
-       gtk_widget_class_bind_template_child (widget_class, GsShellDetails, spinner_install_remove);
+       gtk_widget_class_bind_template_child (widget_class, GsShellDetails, spinner_remove);
        gtk_widget_class_bind_template_child (widget_class, GsShellDetails, stack_details);
        gtk_widget_class_bind_template_child (widget_class, GsShellDetails, grid_details_kudo);
        gtk_widget_class_bind_template_child (widget_class, GsShellDetails, image_details_kudo_docs);
@@ -1946,6 +1976,7 @@ gs_shell_details_class_init (GsShellDetailsClass *klass)
        gtk_widget_class_bind_template_child (widget_class, GsShellDetails, label_details_kudo_integration);
        gtk_widget_class_bind_template_child (widget_class, GsShellDetails, label_details_kudo_translated);
        gtk_widget_class_bind_template_child (widget_class, GsShellDetails, label_details_kudo_updated);
+       gtk_widget_class_bind_template_child (widget_class, GsShellDetails, progressbar_top);
 }
 
 static void
diff --git a/src/gs-shell-details.ui b/src/gs-shell-details.ui
index 3218be7..467fd71 100644
--- a/src/gs-shell-details.ui
+++ b/src/gs-shell-details.ui
@@ -77,7 +77,7 @@
                                 <property name="halign">start</property>
                                 <property name="valign">start</property>
                                 <property name="pixel_size">96</property>
-                                <property name="margin_bottom">28</property>
+                                <property name="margin_bottom">18</property>
                               </object>
                               <packing>
                                 <property name="expand">False</property>
@@ -94,7 +94,6 @@
                                 <property name="valign">start</property>
                                 <property name="margin_start">24</property>
                                 <property name="margin_end">24</property>
-                                <property name="margin_bottom">24</property>
                                 <child>
                                   <object class="GtkLabel" id="application_details_title">
                                     <property name="visible">True</property>
@@ -139,139 +138,6 @@
                                     <property name="position">1</property>
                                   </packing>
                                 </child>
-                                <child>
-                                  <object class="GtkBox" id="box_install_remove">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="spacing">12</property>
-                                    <child>
-                                      <object class="GsProgressButton" id="button_install">
-                                        <property name="use_underline">True</property>
-                                        <property name="label" translatable="yes">_Install</property>
-                                        <property name="width_request">105</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="halign">start</property>
-                                        <property name="valign">start</property>
-                                        <style>
-                                          <class name="suggested-action"/>
-                                        </style>
-                                      </object>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                        <property name="fill">False</property>
-                                        <property name="position">0</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkButton" id="button_remove">
-                                        <property name="use_underline">True</property>
-                                        <property name="label" translatable="yes">_Remove</property>
-                                        <property name="width_request">105</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="halign">start</property>
-                                        <property name="valign">start</property>
-                                      </object>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                        <property name="fill">False</property>
-                                        <property name="position">1</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkSpinner" id="spinner_install_remove">
-                                        <property name="can_focus">False</property>
-                                      </object>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                        <property name="fill">False</property>
-                                        <property name="position">2</property>
-                                      </packing>
-                                    </child>
-
-                                    <child>
-                                      <object class="GtkButton" id="button_cancel">
-                                        <property name="use_underline">True</property>
-                                        <property name="label" translatable="yes">_Cancel</property>
-                                        <property name="width_request">105</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="halign">start</property>
-                                        <property name="valign">start</property>
-                                      </object>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                        <property name="fill">False</property>
-                                        <property name="position">3</property>
-                                      </packing>
-                                    </child>
-
-                                    <child>
-                                      <object class="GtkLabel" id="label_pending">
-                                        <property name="can_focus">False</property>
-                                        <property name="label" translatable="yes">Pending</property>
-                                      </object>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                        <property name="fill">False</property>
-                                        <property name="position">4</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkButton" id="button_details_launch">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">False</property>
-                                        <property name="use_underline">True</property>
-                                        <property name="label" translatable="yes" comments="Translators: A 
label for a button to execute the selected application.">_Launch</property>
-                                        <style>
-                                          <class name="suggested-action"/>
-                                        </style>
-                                      </object>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                        <property name="fill">False</property>
-                                        <property name="position">5</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkLinkButton" id="button_details_add_shortcut">
-                                        <property name="visible">False</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">False</property>
-                                        <property name="use_underline">True</property>
-                                        <property name="label" translatable="yes" comments="Translators: A 
label for a button to add a shortcut to the selected application.">_Add shortcut</property>
-                                      </object>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                        <property name="fill">False</property>
-                                        <property name="position">6</property>
-                                        <property name="pack-type">end</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkLinkButton" id="button_details_remove_shortcut">
-                                        <property name="visible">False</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">False</property>
-                                        <property name="use_underline">True</property>
-                                        <property name="label" translatable="yes" comments="Translators: A 
label for a button to remove a shortcut to the selected application.">Re_move shortcut</property>
-                                      </object>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                        <property name="fill">False</property>
-                                        <property name="position">7</property>
-                                        <property name="pack-type">end</property>
-                                      </packing>
-                                    </child>
-                                  </object>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">True</property>
-                                    <property name="position">2</property>
-                                  </packing>
-                                </child>
                               </object>
                               <packing>
                                 <property name="expand">False</property>
@@ -325,6 +191,200 @@
                             <property name="position">0</property>
                           </packing>
                         </child>
+
+                        <child>
+                          <object class="GtkBox" id="box_install_remove">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="spacing">9</property>
+                            <property name="margin_bottom">9</property>
+                            <child>
+                              <object class="GtkButton" id="button_install">
+                                <property name="use_underline">True</property>
+                                <property name="label" translatable="yes">_Install</property>
+                                <property name="width_request">105</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">True</property>
+                                <property name="halign">start</property>
+                                <property name="valign">start</property>
+                                <style>
+                                  <class name="suggested-action"/>
+                                </style>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkButton" id="button_remove">
+                                <property name="use_underline">True</property>
+                                <property name="label" translatable="yes">_Remove</property>
+                                <property name="width_request">105</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">True</property>
+                                <property name="halign">start</property>
+                                <property name="valign">start</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkSpinner" id="spinner_remove">
+                                <property name="can_focus">False</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkBox" id="box_progress">
+                                <property name="visible">True</property>
+                                <property name="spacing">3</property>
+                                <property name="orientation">vertical</property>
+                                <child>
+                                  <object class="GtkProgressBar" id="progressbar_top">
+                                    <property name="visible">True</property>
+                                    <property name="fraction">0.5</property>
+                                    <property name="valign">center</property>
+                                    <property name="width_request">624</property>
+                                    <style>
+                                      <class name="upgrade-progressbar"/>
+                                    </style>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">True</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkBox" id="box_progress2">
+                                    <property name="visible">True</property>
+                                    <property name="spacing">3</property>
+                                    <property name="halign">center</property>
+                                    <child>
+                                      <object class="GtkLabel" id="label_progress_status">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="label">Downloading</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkLabel" id="label_progress_percentage">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="label">50%</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
+                                <property name="position">3</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkButton" id="button_cancel">
+                                <property name="use_underline">True</property>
+                                <property name="label" translatable="yes">_Cancel</property>
+                                <property name="width_request">116</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">4</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label_pending">
+                                <property name="can_focus">False</property>
+                                <property name="label" translatable="yes">Pending</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">5</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkButton" id="button_details_launch">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="use_underline">True</property>
+                                <property name="label" translatable="yes" comments="Translators: A label for 
a button to execute the selected application.">_Launch</property>
+                                <style>
+                                  <class name="suggested-action"/>
+                                </style>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">6</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLinkButton" id="button_details_add_shortcut">
+                                <property name="visible">False</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="use_underline">True</property>
+                                <property name="label" translatable="yes" comments="Translators: A label for 
a button to add a shortcut to the selected application.">_Add shortcut</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">7</property>
+                                <property name="pack-type">end</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLinkButton" id="button_details_remove_shortcut">
+                                <property name="visible">False</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="use_underline">True</property>
+                                <property name="label" translatable="yes" comments="Translators: A label for 
a button to remove a shortcut to the selected application.">Re_move shortcut</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">8</property>
+                                <property name="pack-type">end</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+
                         <child>
                           <object class="GtkBox" id="box_details_screenshot">
                             <property name="visible">True</property>
@@ -367,7 +427,7 @@
                           <packing>
                             <property name="expand">False</property>
                             <property name="fill">True</property>
-                            <property name="position">1</property>
+                            <property name="position">2</property>
                           </packing>
                         </child>
                         <child>
@@ -384,7 +444,7 @@
                           <packing>
                             <property name="expand">False</property>
                             <property name="fill">False</property>
-                            <property name="position">2</property>
+                            <property name="position">3</property>
                           </packing>
                         </child>
                         <child>
@@ -398,7 +458,7 @@
                           <packing>
                             <property name="expand">False</property>
                             <property name="fill">False</property>
-                            <property name="position">3</property>
+                            <property name="position">4</property>
                           </packing>
                         </child>
                         <child>
@@ -412,7 +472,7 @@
                           <packing>
                             <property name="expand">False</property>
                             <property name="fill">False</property>
-                            <property name="position">4</property>
+                            <property name="position">5</property>
                           </packing>
                         </child>
                         <child>
@@ -426,7 +486,7 @@
                           <packing>
                             <property name="expand">False</property>
                             <property name="fill">False</property>
-                            <property name="position">5</property>
+                            <property name="position">6</property>
                           </packing>
                         </child>
                         <child>
@@ -441,7 +501,7 @@
                           <packing>
                             <property name="expand">False</property>
                             <property name="fill">False</property>
-                            <property name="position">6</property>
+                            <property name="position">7</property>
                           </packing>
                         </child>
                         <child>



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