[gnome-system-monitor] Integrate the renice dialog from the UI file



commit ad86fe59596449ced0e7d407746791511c3d57e5
Author: Robert Roth <robert roth off gmail com>
Date:   Sat Jul 21 10:23:52 2012 +0300

    Integrate the renice dialog from the UI file

 Makefile.am         |    3 +-
 data/preferences.ui |  167 ---------------------------------------------------
 src/procdialogs.cpp |    2 +-
 3 files changed, 3 insertions(+), 169 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index d0b1e7c..9ca636c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,7 +4,8 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
 SUBDIRS = pixmaps po src help
 
 uidir = $(pkgdatadir)
-ui_DATA = data/preferences.ui
+ui_DATA = data/preferences.ui \
+          data/renice.ui
 
 EXTRA_DIST = \
 	$(ui_DATA) \
diff --git a/data/preferences.ui b/data/preferences.ui
index 375bfd8..5b705e6 100644
--- a/data/preferences.ui
+++ b/data/preferences.ui
@@ -1,11 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <!-- interface-requires gtk+ 3.0 -->
-  <object class="GtkImage" id="ok_image">
-    <property name="visible">True</property>
-    <property name="can_focus">False</property>
-    <property name="stock">gtk-ok</property>
-  </object>
   <object class="GtkDialog" id="preferences_dialog">
     <property name="can_focus">False</property>
     <property name="border_width">5</property>
@@ -735,166 +730,4 @@
       <action-widget response="-7">close_button</action-widget>
     </action-widgets>
   </object>
-  <object class="GtkAdjustment" id="renice_adj">
-    <property name="lower">-20</property>
-    <property name="upper">20</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkDialog" id="renice_dialog">
-    <property name="can_focus">False</property>
-    <property name="border_width">5</property>
-    <property name="resizable">False</property>
-    <property name="destroy_with_parent">True</property>
-    <property name="type_hint">dialog</property>
-    <property name="has_resize_grip">False</property>
-    <child internal-child="vbox">
-      <object class="GtkBox" id="renice_layout">
-        <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="renice_action_area">
-            <property name="can_focus">False</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="cancel_button">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="change_priority_button">
-                <property name="label" translatable="yes">Change _Priority</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
-                <property name="image">ok_image</property>
-                <property name="use_underline">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkGrid" id="dialog_content_grid">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="border_width">12</property>
-            <property name="orientation">vertical</property>
-            <property name="row_spacing">12</property>
-            <child>
-              <object class="GtkGrid" id="renice_grid">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="hexpand">True</property>
-                <property name="vexpand">True</property>
-                <property name="row_spacing">6</property>
-                <property name="column_spacing">12</property>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="nice_value_label">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="halign">start</property>
-                    <property name="yalign">0.80000001192092896</property>
-                    <property name="label" translatable="yes">_Nice value:</property>
-                    <property name="use_underline">True</property>
-                    <property name="mnemonic_widget">nice_value_scale</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">0</property>
-                    <property name="top_attach">0</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkScale" id="nice_value_scale">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="hexpand">True</property>
-                    <property name="adjustment">renice_adj</property>
-                    <property name="round_digits">1</property>
-                    <property name="digits">0</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="top_attach">0</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="priority_label">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="top_attach">1</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-              </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">0</property>
-                <property name="width">1</property>
-                <property name="height">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="note_label">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">&lt;small&gt;&lt;i&gt;&lt;b&gt;Note:&lt;/b&gt; The priority of a process is given by its nice value. A lower nice value corresponds to a higher priority.&lt;/i&gt;&lt;/small&gt;</property>
-                <property name="use_markup">True</property>
-              </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">1</property>
-                <property name="width">1</property>
-                <property name="height">1</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">True</property>
-            <property name="fill">True</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </object>
-    </child>
-    <action-widgets>
-      <action-widget response="-6">cancel_button</action-widget>
-      <action-widget response="100">change_priority_button</action-widget>
-    </action-widgets>
-  </object>
 </interface>
diff --git a/src/procdialogs.cpp b/src/procdialogs.cpp
index 03ac2b3..801d9f8 100644
--- a/src/procdialogs.cpp
+++ b/src/procdialogs.cpp
@@ -165,7 +165,7 @@ procdialog_create_renice_dialog (ProcData *procdata)
     if (!info)
         return;
 
-    gchar* filename = g_build_filename (GSM_DATA_DIR, "preferences.ui", NULL);
+    gchar* filename = g_build_filename (GSM_DATA_DIR, "renice.ui", NULL);
 
     builder = gtk_builder_new();
     gtk_builder_add_from_file (builder, filename, NULL);



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