[gimp] app: don't warn when selecting a NULL device (when closing the dialog)
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] app: don't warn when selecting a NULL device (when closing the dialog)
- Date: Sat, 13 Feb 2010 16:40:16 +0000 (UTC)
commit 1083313f488f82c0c0c623a00d86829cbd2cbfde
Author: Michael Natterer <mitch gimp org>
Date: Sat Feb 13 17:39:41 2010 +0100
app: don't warn when selecting a NULL device (when closing the dialog)
app/widgets/gimpdeviceeditor.c | 28 ++++++++++++++++------------
1 files changed, 16 insertions(+), 12 deletions(-)
---
diff --git a/app/widgets/gimpdeviceeditor.c b/app/widgets/gimpdeviceeditor.c
index 5f16e6d..65c4c0d 100644
--- a/app/widgets/gimpdeviceeditor.c
+++ b/app/widgets/gimpdeviceeditor.c
@@ -295,22 +295,26 @@ gimp_device_editor_select_device (GimpContainerView *view,
GimpDeviceEditor *editor)
{
GimpDeviceEditorPrivate *private = GIMP_DEVICE_EDITOR_GET_PRIVATE (editor);
- GimpContainerTreeView *treeview;
- GtkWidget *widget;
- treeview = GIMP_CONTAINER_TREE_VIEW (private->treeview);
+ if (viewable && insert_data)
+ {
+ GimpContainerTreeView *treeview;
+ GtkWidget *widget;
- gtk_tree_model_get (treeview->model, insert_data,
- GIMP_CONTAINER_TREE_VIEW_COLUMN_USER_DATA, &widget,
- -1);
+ treeview = GIMP_CONTAINER_TREE_VIEW (private->treeview);
- if (widget)
- {
- gint page_num = gtk_notebook_page_num (GTK_NOTEBOOK (private->notebook),
- widget);
+ gtk_tree_model_get (treeview->model, insert_data,
+ GIMP_CONTAINER_TREE_VIEW_COLUMN_USER_DATA, &widget,
+ -1);
+
+ if (widget)
+ {
+ gint page_num = gtk_notebook_page_num (GTK_NOTEBOOK (private->notebook),
+ widget);
- gtk_notebook_set_current_page (GTK_NOTEBOOK (private->notebook),
- page_num);
+ gtk_notebook_set_current_page (GTK_NOTEBOOK (private->notebook),
+ page_num);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]