[gnome-control-center] printers: Attach toolbar controlling jobs to list of jobs



commit 50a0f57533f93f015a0f15fb8f8dfb3cb4dc9b79
Author: Marek Kasik <mkasik redhat com>
Date:   Tue Jan 15 16:18:19 2013 +0100

    printers: Attach toolbar controlling jobs to list of jobs
    
    Use inline-toolbar style for the toolbar containing
    buttons for controlling jobs. Set junctions so it
    visually connects with the list of jobs.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=690421

 panels/printers/jobs-dialog.ui   |    3 +++
 panels/printers/pp-jobs-dialog.c |   26 ++++++++++++++++++++------
 2 files changed, 23 insertions(+), 6 deletions(-)
---
diff --git a/panels/printers/jobs-dialog.ui b/panels/printers/jobs-dialog.ui
index d58be2c..af6c408 100644
--- a/panels/printers/jobs-dialog.ui
+++ b/panels/printers/jobs-dialog.ui
@@ -102,6 +102,9 @@
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="icon_size">1</property>
+                        <style>
+                          <class name="inline-toolbar"/>
+                        </style>
                         <child>
                           <object class="GtkToolButton" id="job-release-button">
                             <property name="use_action_appearance">False</property>
diff --git a/panels/printers/pp-jobs-dialog.c b/panels/printers/pp-jobs-dialog.c
index c7aad5d..917a885 100644
--- a/panels/printers/pp-jobs-dialog.c
+++ b/panels/printers/pp-jobs-dialog.c
@@ -429,12 +429,13 @@ pp_jobs_dialog_new (GtkWindow            *parent,
                     gpointer              user_data,
                     gchar                *printer_name)
 {
-  PpJobsDialog *dialog;
-  GtkWidget    *widget;
-  GError       *error = NULL;
-  gchar        *objects[] = { "jobs-dialog", NULL };
-  guint         builder_result;
-  gchar        *title;
+  GtkStyleContext *context;
+  PpJobsDialog    *dialog;
+  GtkWidget       *widget;
+  GError          *error = NULL;
+  gchar           *objects[] = { "jobs-dialog", NULL };
+  guint            builder_result;
+  gchar           *title;
 
   dialog = g_new0 (PpJobsDialog, 1);
 
@@ -479,6 +480,19 @@ pp_jobs_dialog_new (GtkWindow            *parent,
     gtk_builder_get_object (dialog->builder, "job-release-button");
   g_signal_connect (widget, "clicked", G_CALLBACK (job_process_cb), dialog);
 
+
+  /* Set junctions */
+  widget = (GtkWidget*)
+    gtk_builder_get_object (dialog->builder, "queue-scrolledwindow");
+  context = gtk_widget_get_style_context (widget);
+  gtk_style_context_set_junction_sides (context, GTK_JUNCTION_BOTTOM);
+
+  widget = (GtkWidget*)
+    gtk_builder_get_object (dialog->builder, "queue-toolbar");
+  context = gtk_widget_get_style_context (widget);
+  gtk_style_context_set_junction_sides (context, GTK_JUNCTION_TOP);
+
+
   widget = (GtkWidget*)
     gtk_builder_get_object (dialog->builder, "jobs-title");
   title = g_strdup_printf (_("%s Active Jobs"), printer_name);



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