r14589 - gnucash/trunk - Add tooltips to the checkboxes in the Reset Warnings dialog showing the

Andreas Köhler andi5 at cvs.gnucash.org
Thu Aug 3 05:30:58 EDT 2006


Author: andi5
Date: 2006-08-03 05:30:56 -0400 (Thu, 03 Aug 2006)
New Revision: 14589
Trac: http://svn.gnucash.org/trac/changeset/14589

Modified:
   gnucash/trunk/ChangeLog
   gnucash/trunk/src/gnome-utils/dialog-reset-warnings.c
   gnucash/trunk/src/gnome/schemas/apps_gnucash_warnings.schemas.in
Log:
Add tooltips to the checkboxes in the Reset Warnings dialog showing the
long descriptions. Remove all linebreaks in these strings to make them
look better.


Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog	2006-08-02 18:13:30 UTC (rev 14588)
+++ gnucash/trunk/ChangeLog	2006-08-03 09:30:56 UTC (rev 14589)
@@ -1,3 +1,11 @@
+2006-08-03  Andreas Köhler  <andi5.py at gmx.net>
+
+	* src/gnome-utils/dialog-reset-warnings.c:
+	* src/gnome/schemas/apps_gnucash_warnings.schemas.in: Add tooltips
+	  to the checkboxes in the Reset Warnings dialog showing the long
+	  descriptions. Remove all linebreaks in these strings to make
+	  them look better.
+
 2006-08-02  David Hampton  <hampton at employees.org>
 
 	* various: Remove the majority of the remaining deprecated widgets

Modified: gnucash/trunk/src/gnome/schemas/apps_gnucash_warnings.schemas.in
===================================================================
--- gnucash/trunk/src/gnome/schemas/apps_gnucash_warnings.schemas.in	2006-08-02 18:13:30 UTC (rev 14588)
+++ gnucash/trunk/src/gnome/schemas/apps_gnucash_warnings.schemas.in	2006-08-03 09:30:56 UTC (rev 14589)
@@ -11,11 +11,7 @@
       <default>0</default>
       <locale name="C">
         <short>Change contents of reconciled split</short>
-        <long>
-	  This dialog is presented before allowing you to change the
-	  contents of a reconciled split.  Allowing these changes can
-	  make it hard to perform future reconciliations.
-	</long>
+        <long>This dialog is presented before allowing you to change the contents of a reconciled split.  Allowing these changes can make it hard to perform future reconciliations.</long>
       </locale>
     </schema>
 
@@ -28,10 +24,7 @@
       <default>0</default>
       <locale name="C">
         <short>Exit GnuCash</short>
-        <long>
-	  This dialog is presented when you attempt to close the last GnuCash
-	  window.
-	</long>
+        <long>This dialog is presented when you attempt to close the last GnuCash window.</long>
       </locale>
     </schema>
 
@@ -44,12 +37,7 @@
       <default>0</default>
       <locale name="C">
         <short>Mark transaction split as unreconciled</short>
-        <long>
-	  This dialog is presented before allowing you to mark a
-	  transaction split as unreconciled.  Doing so will throw off
-	  the reconciled value of the register and can make it hard to
-	  perform future reconciliations.
-	</long>
+        <long>This dialog is presented before allowing you to mark a transaction split as unreconciled.  Doing so will throw off the reconciled value of the register and can make it hard to perform future reconciliations.</long>
       </locale>
     </schema>
 
@@ -62,9 +50,7 @@
       <default>0</default>
       <locale name="C">
         <short>Read only register</short>
-        <long>
-	  This dialog is presented when a read-only register is opened.
-	</long>
+        <long>This dialog is presented when a read-only register is opened.</long>
       </locale>
     </schema>
 
@@ -77,9 +63,7 @@
       <default>0</default>
       <locale name="C">
         <short>Delete a transaction</short>
-        <long>
-	  This dialog is presented before allowing you to delete a transaction.
-	</long>
+        <long>This dialog is presented before allowing you to delete a transaction.</long>
       </locale>
     </schema>
 
@@ -92,12 +76,7 @@
       <default>0</default>
       <locale name="C">
         <short>Delete a transaction</short>
-        <long>
-	  This dialog is presented before allowing you to delete a 
-	  transaction that contains reconciled splits.  Doing so will
-	  throw off the reconciled value of the register and can make
-	  it hard to perform future reconciliations.
-        </long>
+        <long>This dialog is presented before allowing you to delete a transaction that contains reconciled splits.  Doing so will throw off the reconciled value of the register and can make it hard to perform future reconciliations.</long>
       </locale>
     </schema>
 
@@ -110,10 +89,7 @@
       <default>0</default>
       <locale name="C">
         <short>Remove a splits from a transaction</short>
-        <long>
-	  This dialog is presented before allowing you to remove a
-	  splits from a transaction.
-	</long>
+        <long>This dialog is presented before allowing you to remove a splits from a transaction.</long>
       </locale>
     </schema>
 
@@ -126,12 +102,7 @@
       <default>0</default>
       <locale name="C">
         <short>Remove a splits from a transaction</short>
-        <long>
-	  This dialog is presented before allowing you to remove a
-	  reconciled splits from a transaction. Doing so will throw
-	  off the reconciled value of the register and can make it
-	  hard to perform future reconciliations.
-	</long>
+        <long>This dialog is presented before allowing you to remove a reconciled split from a transaction.  Doing so will throw off the reconciled value of the register and can make it hard to perform future reconciliations.</long>
       </locale>
     </schema>
 
@@ -144,10 +115,7 @@
       <default>0</default>
       <locale name="C">
         <short>Remove all the splits from a transaction</short>
-        <long>
-	  This dialog is presented before allowing you to remove all
-	  splits from a transaction.
-	</long>
+        <long>This dialog is presented before allowing you to remove all splits from a transaction.</long>
       </locale>
     </schema>
 
@@ -160,12 +128,7 @@
       <default>0</default>
       <locale name="C">
         <short>Remove all the splits from a transaction</short>
-        <long>
-	  This dialog is presented before allowing you to remove all
-	  splits (including some reconciled splits) from a transaction.
-          Doing so will throw off the reconciled value of the register
-          and can make it hard to perform future reconciliations.
-	</long>
+        <long>This dialog is presented before allowing you to remove all splits (including some reconciled splits) from a transaction.  Doing so will throw off the reconciled value of the register and can make it hard to perform future reconciliations.</long>
       </locale>
     </schema>
 
@@ -178,10 +141,7 @@
       <default>0</default>
       <locale name="C">
         <short>Commit changes to a transaction</short>
-        <long>
-          This dialog is presented when you attempt to move out of a modified
-          transaction.  The changed data must be either saved or discarded.
-	</long>
+        <long>This dialog is presented when you attempt to move out of a modified transaction.  The changed data must be either saved or discarded.</long>
       </locale>
     </schema>
 
@@ -194,10 +154,7 @@
       <default>0</default>
       <locale name="C">
         <short>Duplicating a changed transaction</short>
-        <long>
-          This dialog is presented when you attempt to duplicate a modified
-          transaction.  The changed data must be saved or the duplication canceled.
-	</long>
+        <long>This dialog is presented when you attempt to duplicate a modified transaction.  The changed data must be saved or the duplication canceled.</long>
       </locale>
     </schema>
 
@@ -210,10 +167,7 @@
       <default>0</default>
       <locale name="C">
         <short>Commit changes to a invoice_entry</short>
-        <long>
-          This dialog is presented when you attempt to move out of a modified
-          invoice entry.  The changed data must be either saved or discarded.
-	</long>
+        <long>This dialog is presented when you attempt to move out of a modified invoice entry.  The changed data must be either saved or discarded.</long>
       </locale>
     </schema>
 
@@ -226,10 +180,7 @@
       <default>0</default>
       <locale name="C">
         <short>Duplicating a changed invoice_entry</short>
-        <long>
-          This dialog is presented when you attempt to duplicate a modified
-          invoice entry.  The changed data must be saved or the duplication canceled.
-	</long>
+        <long>This dialog is presented when you attempt to duplicate a modified invoice entry.  The changed data must be saved or the duplication canceled.</long>
       </locale>
     </schema>
 
@@ -242,9 +193,7 @@
       <default>0</default>
       <locale name="C">
         <short>Delete a commodity</short>
-        <long>
-	  This dialog is presented before allowing you to delete a commodity.
-	</long>
+        <long>This dialog is presented before allowing you to delete a commodity.</long>
       </locale>
     </schema>
 
@@ -257,11 +206,7 @@
       <default>0</default>
       <locale name="C">
         <short>Delete a commodity and prices</short>
-        <long>
-	  This dialog is presented before allowing you to delete a commodity
-	  that has price quotes attached.  Deleting the commodity will delete
-	  the quotes as well.
-	</long>
+        <long>This dialog is presented before allowing you to delete a commodity that has price quotes attached.  Deleting the commodity will delete the quotes as well.</long>
       </locale>
     </schema>
 
@@ -274,10 +219,7 @@
       <default>0</default>
       <locale name="C">
         <short>Delete multiple price quotes</short>
-        <long>
-	  This dialog is presented before allowing you to delete multiple price
-	  quotes at one time.
-	</long>
+        <long>This dialog is presented before allowing you to delete multiple price quotes at one time.</long>
       </locale>
     </schema>
 

Modified: gnucash/trunk/src/gnome-utils/dialog-reset-warnings.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-reset-warnings.c	2006-08-02 18:13:30 UTC (rev 14588)
+++ gnucash/trunk/src/gnome-utils/dialog-reset-warnings.c	2006-08-03 09:30:56 UTC (rev 14589)
@@ -38,6 +38,7 @@
 #define GCONF_SECTION			"dialogs/reset_warnings"
 #define DIALOG_RESET_WARNINGS_CM_CLASS	"reset-warnings"
 #define GCONF_ENTRY_LIST		"gconf_entries"
+#define TIPS_STRING                     "tips"
 
 void gnc_reset_warnings_select_all_cb (GtkButton *button, gpointer user_data);
 void gnc_reset_warnings_unselect_all_cb (GtkButton *button, gpointer user_data);
@@ -240,7 +241,7 @@
 static void
 gnc_reset_warnings_add_one (GConfEntry *entry, GtkWidget *box)
 {
-  const gchar *name, *schema_name, *desc = NULL;
+  const gchar *name, *schema_name, *desc, *long_desc = NULL;
   GtkWidget *checkbox;
   GConfSchema *schema = NULL;
 
@@ -253,7 +254,17 @@
     DEBUG("found schema %p", schema);
     desc = gconf_schema_get_short_desc(schema);
     DEBUG("description %s", desc);
+    long_desc = gconf_schema_get_long_desc(schema);
     checkbox = gtk_check_button_new_with_label(desc ? desc : name);
+    if (long_desc) {
+      GtkTooltips *tips;
+      tips = g_object_get_data(G_OBJECT(box), TIPS_STRING);
+      if (!tips) {
+        tips = gtk_tooltips_new();
+        g_object_set_data(G_OBJECT(box), TIPS_STRING, tips);
+      }
+      gtk_tooltips_set_tip(tips, checkbox, long_desc, NULL);
+    }
     gconf_schema_free(schema);
   } else {
     DEBUG("no schema");



More information about the gnucash-changes mailing list