[gnome-system-monitor] Rework a bit the interface



commit 4fd60fe65b84692e032d100bcb85cfaf9bedd506
Author: Stefano Facchini <stefano facchini gmail com>
Date:   Thu Aug 1 10:52:45 2013 +0200

    Rework a bit the interface
    
    Move the searchbar in a more usual position and add a search
    button (inactive for now).
    
    Also, remove some useless margins from the treeviews.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=705270

 data/interface.ui |   83 +++++++++++++++++++++++++++-------------------------
 src/interface.cpp |    4 ++
 src/procman-app.h |    1 +
 3 files changed, 48 insertions(+), 40 deletions(-)
---
diff --git a/data/interface.ui b/data/interface.ui
index 1b3da5f..05c7b1a 100644
--- a/data/interface.ui
+++ b/data/interface.ui
@@ -41,6 +41,24 @@
               </packing>
             </child>
             <child>
+              <object class="GtkToggleButton" id="search_button">
+                <property name="visible">True</property>
+                <style>
+                    <class name="image-button"/>
+                </style>
+                <child>
+                  <object class="GtkImage" id="search_image">
+                    <property name="visible">True</property>
+                    <property name="icon_size">1</property>
+                    <property name="icon_name">edit-find-symbolic</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="pack_type">end</property>
+              </packing>
+            </child>
+            <child>
               <object class="GtkMenuButton" id="process_menu_button">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
@@ -74,24 +92,19 @@
                 <property name="can_focus">False</property>
                 <property name="hexpand">True</property>
                 <property name="vexpand">True</property>
-                <property name="border_width">12</property>
                 <property name="orientation">vertical</property>
-                <property name="spacing">18</property>
                 <child>
-                  <object class="GtkBox" id="proc_top_box">
-                    <property name="visible">True</property>
+                  <object class="GtkSearchBar" id="proc_searchbar">
+                   <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <child>
-                      <object class="GtkLabel" id="load_avg_label">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="halign">start</property>
-                      </object>
-                      <packing>
-                        <property name="expand">True</property>
-                        <property name="fill">True</property>
-                        <property name="position">0</property>
-                      </packing>
+                     <object class="GtkSearchEntry" id="proc_searchentry">
+                       <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="hexpand">True</property>
+                        <property name="vexpand">True</property>
+                        <property name="halign">fill</property>
+                     </object>
                     </child>
                   </object>
                   <packing>
@@ -101,38 +114,30 @@
                   </packing>
                 </child>
                 <child>
+                  <object class="GtkLabel" id="load_avg_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">start</property>
+                    <property name="margin">12</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
                   <object class="GtkBox" id="proclist_box">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="orientation">vertical</property>
                     <child>
-                      <object class="GtkSearchBar" id="proc_searchbar">
-                                       <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="show-close-button">True</property>
-                        <child>
-                                                 <object class="GtkSearchEntry" id="proc_searchentry">
-                                                       <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="hexpand">True</property>
-                            <property name="vexpand">True</property>
-                            <property name="halign">fill</property>
-                                                 </object>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
                       <object class="GtkScrolledWindow" id="processes_scrolled">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="hexpand">True</property>
                         <property name="vexpand">True</property>
-                        <property name="shadow_type">in</property>
+                        <property name="shadow_type">none</property>
                         <child>
                           <placeholder/>
                         </child>
@@ -147,7 +152,7 @@
                   <packing>
                     <property name="expand">True</property>
                     <property name="fill">True</property>
-                    <property name="position">1</property>
+                    <property name="position">2</property>
                   </packing>
                 </child>
               </object>
@@ -548,16 +553,14 @@
               <object class="GtkBox" id="fs_box">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="border_width">12</property>
                 <property name="orientation">vertical</property>
-                <property name="spacing">6</property>
                 <child>
                   <object class="GtkScrolledWindow" id="disks_scrolled">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="hexpand">True</property>
                     <property name="vexpand">True</property>
-                    <property name="shadow_type">in</property>
+                    <property name="shadow_type">none</property>
                     <child>
                       <placeholder/>
                     </child>
diff --git a/src/interface.cpp b/src/interface.cpp
index f032845..0ef6710 100644
--- a/src/interface.cpp
+++ b/src/interface.cpp
@@ -523,6 +523,7 @@ update_page_activities (ProcmanApp *app)
         proctable_thaw (app);
 
         gtk_widget_show (app->end_process_button);
+        gtk_widget_show (app->search_button);
         gtk_widget_show (app->process_menu_button);
 
         update_sensitivity (app);
@@ -532,6 +533,7 @@ update_page_activities (ProcmanApp *app)
         proctable_freeze (app);
 
         gtk_widget_hide (app->end_process_button);
+        gtk_widget_hide (app->search_button);
         gtk_widget_hide (app->process_menu_button);
 
         update_sensitivity (app);
@@ -606,6 +608,8 @@ create_main_window (ProcmanApp *app)
 
     app->end_process_button = GTK_WIDGET (gtk_builder_get_object (builder, "end_process_button"));
 
+    app->search_button = GTK_WIDGET (gtk_builder_get_object (builder, "search_button"));
+
     GActionEntry win_action_entries[] = {
         { "about", on_activate_about, NULL, NULL, NULL },
         { "send-signal-stop", on_activate_send_signal, "i", NULL, NULL },
diff --git a/src/procman-app.h b/src/procman-app.h
index 4067adb..5f4ffd9 100644
--- a/src/procman-app.h
+++ b/src/procman-app.h
@@ -167,6 +167,7 @@ public:
     GtkWidget        *refresh_button;
     GtkWidget        *process_menu_button;
     GtkWidget        *end_process_button;
+    GtkWidget        *search_button;
     GtkWidget        *search_entry;
     ProcConfig        config;
     LoadGraph        *cpu_graph;


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