[gnumeric] Provide more descriptive error message
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnumeric] Provide more descriptive error message
- Date: Mon, 29 Jun 2009 00:17:59 +0000 (UTC)
commit c6b3a1f469a57d09edf053b392c817f4763e6ec6
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date: Sun Jun 28 18:17:22 2009 -0600
Provide more descriptive error message
2009-06-28 Andreas J. Guelzow <aguelzow pyrshep ca>
* src/wbc-gtk-actions.c (cb_help_docs): pass flags to g_spawn_async
and provide more descriptive error message
2009-06-28 Andreas J. Guelzow <aguelzow pyrshep ca>
* cell-format.glade: add buttons
* dialog-cell-format.c (fmt_dialog_init_conditions_page): disable
buttons
ChangeLog | 5 +++
src/dialogs/ChangeLog | 6 +++
src/dialogs/cell-format.glade | 65 ++++++++++++++++++++++++++++++++++---
src/dialogs/dialog-cell-format.c | 16 +++++++++
src/wbc-gtk-actions.c | 19 ++++++++---
5 files changed, 100 insertions(+), 11 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 24f061a..8588dd8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-06-28 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * src/wbc-gtk-actions.c (cb_help_docs): pass flags to g_spawn_async
+ and provide more descriptive error message
+
2009-06-28 Morten Welinder <terra gnome org>
* src/gui-file.c (gui_file_template): Do not set a NULL uri here.
diff --git a/src/dialogs/ChangeLog b/src/dialogs/ChangeLog
index 5f31d92..c0f1d25 100644
--- a/src/dialogs/ChangeLog
+++ b/src/dialogs/ChangeLog
@@ -1,3 +1,9 @@
+2009-06-28 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * cell-format.glade: add buttons
+ * dialog-cell-format.c (fmt_dialog_init_conditions_page): disable
+ buttons
+
2009-06-27 Andreas J. Guelzow <aguelzow pyrshep ca>
* dialog-sheet-order.c (dialog_sheet_order): restore window
diff --git a/src/dialogs/cell-format.glade b/src/dialogs/cell-format.glade
index 1d4908e..5d56318 100644
--- a/src/dialogs/cell-format.glade
+++ b/src/dialogs/cell-format.glade
@@ -2784,6 +2784,20 @@ val <= bound (less than or equal)</property>
<property name="visible">True</property>
<property name="layout_style">start</property>
<child>
+ <widget class="GtkButton" id="conditions_add">
+ <property name="label" translatable="no">gtk-add</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
<widget class="GtkButton" id="conditions_remove">
<property name="label" translatable="no">gtk-remove</property>
<property name="visible">True</property>
@@ -2794,17 +2808,56 @@ val <= bound (less than or equal)</property>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">0</property>
+ <property name="position">1</property>
</packing>
</child>
- </widget>
- <packing>
+ <child>
+ <widget class="GtkButton" id="conditions_clear">
+ <property name="label" translatable="no">gtk-clear</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton" id="conditions_expand">
+ <property name="label" translatable="yes">E_xpand</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton" id="conditions_edit">
+ <property name="label" translatable="no">gtk-edit</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
<property name="position">0</property>
</packing>
</child>
- <child>
- <placeholder/>
- </child>
</widget>
<packing>
<property name="top_attach">1</property>
diff --git a/src/dialogs/dialog-cell-format.c b/src/dialogs/dialog-cell-format.c
index a09f281..fe8ebd7 100644
--- a/src/dialogs/dialog-cell-format.c
+++ b/src/dialogs/dialog-cell-format.c
@@ -206,7 +206,11 @@ typedef struct _FormatState {
GtkTextView *msg;
} input_msg;
struct {
+ GtkButton *add;
GtkButton *remove;
+ GtkButton *clear;
+ GtkButton *expand;
+ GtkButton *edit;
GtkLabel *label;
GtkTreeStore *model;
} conditions;
@@ -2177,9 +2181,21 @@ fmt_dialog_init_conditions_page (FormatState *state)
g_return_if_fail (state != NULL);
+ state->conditions.add = GTK_BUTTON (glade_xml_get_widget (state->gui,
+ "conditions_add"));
+ gtk_widget_set_sensitive (GTK_WIDGET (state->conditions.add), FALSE);
state->conditions.remove = GTK_BUTTON (glade_xml_get_widget (state->gui,
"conditions_remove"));
gtk_widget_set_sensitive (GTK_WIDGET (state->conditions.remove), FALSE);
+ state->conditions.clear = GTK_BUTTON (glade_xml_get_widget (state->gui,
+ "conditions_clear"));
+ gtk_widget_set_sensitive (GTK_WIDGET (state->conditions.clear), FALSE);
+ state->conditions.expand = GTK_BUTTON (glade_xml_get_widget (state->gui,
+ "conditions_expand"));
+ gtk_widget_set_sensitive (GTK_WIDGET (state->conditions.expand), FALSE);
+ state->conditions.edit = GTK_BUTTON (glade_xml_get_widget (state->gui,
+ "conditions_edit"));
+ gtk_widget_set_sensitive (GTK_WIDGET (state->conditions.edit), FALSE);
state->conditions.model = gtk_tree_store_new (CONDITIONS_NUM_COLUMNS,
G_TYPE_STRING,
diff --git a/src/wbc-gtk-actions.c b/src/wbc-gtk-actions.c
index a110d9c..d24f18a 100644
--- a/src/wbc-gtk-actions.c
+++ b/src/wbc-gtk-actions.c
@@ -1013,21 +1013,30 @@ static GNM_ACTION_DEF (cb_help_docs)
#ifndef G_OS_WIN32
argv[0] = (char *)"yelp";
argv[1] = (char *)"ghelp:gnumeric";
- g_spawn_async (NULL, argv, NULL, G_SPAWN_SEARCH_PATH,
- NULL, NULL, NULL, &err);
+ g_spawn_async (NULL, argv, NULL,
+ G_SPAWN_SEARCH_PATH | G_SPAWN_STDOUT_TO_DEV_NULL
+ | G_SPAWN_STDERR_TO_DEV_NULL,
+ NULL, NULL, NULL, &err);
#else
/* TODO : Should really start in same directory as the gspawn-* helpers
* are installed in case they are not in the path */
argv[0] = (char *)"hh";
argv[1] = g_build_filename (gnm_sys_data_dir (), "doc", "C",
"gnumeric.chm", NULL);
- g_spawn_async (NULL, argv, NULL, G_SPAWN_SEARCH_PATH,
- NULL, NULL, NULL, &err);
+ g_spawn_async (NULL, argv, NULL,
+ G_SPAWN_SEARCH_PATH | G_SPAWN_STDOUT_TO_DEV_NULL
+ | G_SPAWN_STDERR_TO_DEV_NULL,
+ NULL, NULL, NULL, &err);
g_free (argv[1]);
#endif
if (NULL != err) {
- go_cmd_context_error (GO_CMD_CONTEXT (wbcg), err);
+ ErrorInfo *ei = error_info_new_printf
+ (_("Unable to start the help browser (%s).\n"
+ "The system error message is: \n\n%s"),
+ argv[0], err->message);
+ go_cmd_context_error_info (GO_CMD_CONTEXT (wbcg), ei);
g_error_free (err);
+ g_free (ei);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]