gnome-session r4809 - in branches/dbus_based: . gnome-session



Author: mccann
Date: Thu Jul 17 18:52:01 2008
New Revision: 4809
URL: http://svn.gnome.org/viewvc/gnome-session?rev=4809&view=rev

Log:
2008-07-17  William Jon McCann  <jmccann redhat com>

	* gnome-session/gsm-inhibit-dialog.c (update_dialog_text),
	(name_cell_data_func):
	* gnome-session/gsm-inhibit-dialog.glade:
	Add back heading to inhibit dialog since it makes more
	sense when some applications are not busy.



Modified:
   branches/dbus_based/ChangeLog
   branches/dbus_based/gnome-session/gsm-inhibit-dialog.c
   branches/dbus_based/gnome-session/gsm-inhibit-dialog.glade

Modified: branches/dbus_based/gnome-session/gsm-inhibit-dialog.c
==============================================================================
--- branches/dbus_based/gnome-session/gsm-inhibit-dialog.c	(original)
+++ branches/dbus_based/gnome-session/gsm-inhibit-dialog.c	Thu Jul 17 18:52:01 2008
@@ -39,7 +39,7 @@
 
 #define GSM_INHIBIT_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSM_TYPE_INHIBIT_DIALOG, GsmInhibitDialogPrivate))
 
-#define GLADE_XML_FILE "gsm-logout-inhibit-dialog.glade"
+#define GLADE_XML_FILE "gsm-inhibit-dialog.glade"
 
 #ifndef DEFAULT_ICON_SIZE
 #define DEFAULT_ICON_SIZE 64
@@ -103,7 +103,7 @@
 
 static void
 gsm_inhibit_dialog_set_action (GsmInhibitDialog *dialog,
-                                      int                     action)
+                               int               action)
 {
         dialog->priv->action = action;
 }
@@ -344,16 +344,27 @@
 update_dialog_text (GsmInhibitDialog *dialog)
 {
         const char *description_text;
+        const char *header_text;
         GtkWidget  *widget;
 
         if (model_has_one_entry (GTK_TREE_MODEL (dialog->priv->list_store))) {
                 g_debug ("Found one entry in model");
+                header_text = _("A program is still running:");
                 description_text = _("Waiting for program to finish.  Interrupting program may cause you to lose work.");
         } else {
                 g_debug ("Found multiple entries in model");
+                header_text = _("Some programs are still running:");
                 description_text = _("Waiting for programs to finish.  Interrupting these programs may cause you to lose work.");
         }
 
+        widget = glade_xml_get_widget (dialog->priv->xml, "header-label");
+        if (widget != NULL) {
+                char *markup;
+                markup = g_strdup_printf ("<b>%s</b>", header_text);
+                gtk_label_set_markup (GTK_LABEL (widget), markup);
+                g_free (markup);
+        }
+
         widget = glade_xml_get_widget (dialog->priv->xml, "description-label");
         if (widget != NULL) {
                 gtk_label_set_text (GTK_LABEL (widget), description_text);
@@ -402,8 +413,8 @@
 }
 
 static void
-gsm_inhibit_dialog_set_inhibitor_store (GsmInhibitDialog *dialog,
-                                               GsmInhibitorStore      *store)
+gsm_inhibit_dialog_set_inhibitor_store (GsmInhibitDialog  *dialog,
+                                        GsmInhibitorStore *store)
 {
         g_return_if_fail (GSM_IS_INHIBIT_DIALOG (dialog));
 
@@ -441,9 +452,9 @@
 
 static void
 gsm_inhibit_dialog_set_property (GObject        *object,
-                                        guint           prop_id,
-                                        const GValue   *value,
-                                        GParamSpec     *pspec)
+                                 guint           prop_id,
+                                 const GValue   *value,
+                                 GParamSpec     *pspec)
 {
         GsmInhibitDialog *dialog = GSM_INHIBIT_DIALOG (object);
 
@@ -500,8 +511,8 @@
                             INHIBIT_REASON_COLUMN, &reason,
                             -1);
 
-        markup = g_strdup_printf ("<b>%s</b> is busy\n"
-                                  "<i><span size=\"x-small\">%s</span></i>",
+        markup = g_strdup_printf ("<b>%s</b>\n"
+                                  "<span size=\"small\">%s</span>",
                                   name ? name : "(null)",
                                   reason ? reason : "(null)");
 

Modified: branches/dbus_based/gnome-session/gsm-inhibit-dialog.glade
==============================================================================
--- branches/dbus_based/gnome-session/gsm-inhibit-dialog.glade	(original)
+++ branches/dbus_based/gnome-session/gsm-inhibit-dialog.glade	Thu Jul 17 18:52:01 2008
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.4 on Mon Jul  7 10:16:11 2008 -->
+<!--Generated with glade3 3.4.4 on Thu Jul 17 14:48:12 2008 -->
 <glade-interface>
   <widget class="GtkDialog" id="dialog1">
     <property name="border_width">5</property>
@@ -12,36 +12,59 @@
         <property name="visible">True</property>
         <property name="spacing">6</property>
         <child>
-          <widget class="GtkVBox" id="main-box">
+          <widget class="GtkHBox" id="hbox1">
             <property name="visible">True</property>
-            <property name="border_width">6</property>
-            <property name="spacing">6</property>
             <child>
-              <widget class="GtkTreeView" id="inhibitors-treeview">
+              <widget class="GtkVBox" id="main-box">
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="headers_visible">False</property>
-                <property name="headers_clickable">False</property>
-                <property name="enable_search">False</property>
-                <property name="show_expanders">False</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="description-label">
-                <property name="width_request">300</property>
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Waiting for program to finish.  Interrupting program may cause you to lose work.</property>
-                <property name="wrap">True</property>
+                <property name="border_width">6</property>
+                <property name="spacing">6</property>
+                <child>
+                  <widget class="GtkLabel" id="header-label">
+                    <property name="visible">True</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Some programs are still running:&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                    <property name="wrap">True</property>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkTreeView" id="inhibitors-treeview">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="headers_visible">False</property>
+                    <property name="headers_clickable">False</property>
+                    <property name="enable_search">False</property>
+                    <property name="show_expanders">False</property>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="description-label">
+                    <property name="visible">True</property>
+                    <property name="xalign">0</property>
+                    <property name="yalign">0</property>
+                    <property name="label" translatable="yes">Waiting for program to finish.  Interrupting program may cause you to lose work.</property>
+                    <property name="wrap">True</property>
+                  </widget>
+                  <packing>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
               </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
             </child>
           </widget>
           <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
             <property name="position">1</property>
           </packing>
         </child>



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