[gimp] app: add a custom GUI for gegl:diffraction-patterns



commit 9d75844b7a3bd874ba1b914ff44c614b21edb7bf
Author: Michael Natterer <mitch gimp org>
Date:   Fri Feb 6 19:43:49 2015 +0100

    app: add a custom GUI for gegl:diffraction-patterns

 app/widgets/gimppropgui-constructors.c |   63 ++++++++++++++++++++++++++++++++
 app/widgets/gimppropgui-constructors.h |    8 ++++
 app/widgets/gimppropgui.c              |    2 +
 3 files changed, 73 insertions(+), 0 deletions(-)
---
diff --git a/app/widgets/gimppropgui-constructors.c b/app/widgets/gimppropgui-constructors.c
index cfc0de6..6b9280a 100644
--- a/app/widgets/gimppropgui-constructors.c
+++ b/app/widgets/gimppropgui-constructors.c
@@ -624,6 +624,69 @@ _gimp_prop_gui_new_channel_mixer (GObject              *config,
   return main_vbox;
 }
 
+
+GtkWidget *
+_gimp_prop_gui_new_diffraction_patterns (GObject              *config,
+                                         GParamSpec          **param_specs,
+                                         guint                 n_param_specs,
+                                         GimpContext          *context,
+                                         GimpCreatePickerFunc  create_picker_func,
+                                         gpointer              picker_creator)
+{
+  GtkWidget *notebook;
+  GtkWidget *vbox;
+
+  g_return_val_if_fail (G_IS_OBJECT (config), NULL);
+  g_return_val_if_fail (param_specs != NULL, NULL);
+  g_return_val_if_fail (n_param_specs > 0, NULL);
+  g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
+
+  notebook = gtk_notebook_new ();
+
+  vbox = _gimp_prop_gui_new_generic (config,
+                                     param_specs + 0, 3,
+                                     context,
+                                     create_picker_func,
+                                     picker_creator);
+  gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
+  gtk_notebook_append_page (GTK_NOTEBOOK (notebook), vbox,
+                            gtk_label_new ("Frequencies"));
+  gtk_widget_show (vbox);
+
+  vbox = _gimp_prop_gui_new_generic (config,
+                                     param_specs + 3, 3,
+                                     context,
+                                     create_picker_func,
+                                     picker_creator);
+  gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
+  gtk_notebook_append_page (GTK_NOTEBOOK (notebook), vbox,
+                            gtk_label_new ("Contours"));
+  gtk_widget_show (vbox);
+
+  vbox = _gimp_prop_gui_new_generic (config,
+                                     param_specs + 6, 3,
+                                     context,
+                                     create_picker_func,
+                                     picker_creator);
+  gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
+  gtk_notebook_append_page (GTK_NOTEBOOK (notebook), vbox,
+                            gtk_label_new ("Sharp Edges"));
+  gtk_widget_show (vbox);
+
+  vbox = _gimp_prop_gui_new_generic (config,
+                                     param_specs + 9, 3,
+                                     context,
+                                     create_picker_func,
+                                     picker_creator);
+  gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
+  gtk_notebook_append_page (GTK_NOTEBOOK (notebook), vbox,
+                            gtk_label_new ("Other Options"));
+  gtk_widget_show (vbox);
+
+  return notebook;
+}
+
+
 /*  private functions  */
 
 static void
diff --git a/app/widgets/gimppropgui-constructors.h b/app/widgets/gimppropgui-constructors.h
index 15eea71..eec7079 100644
--- a/app/widgets/gimppropgui-constructors.h
+++ b/app/widgets/gimppropgui-constructors.h
@@ -54,4 +54,12 @@ GtkWidget * _gimp_prop_gui_new_channel_mixer
                                         GimpCreatePickerFunc  create_picker_func,
                                         gpointer              picker_creator);
 
+GtkWidget * _gimp_prop_gui_new_diffraction_patterns
+                                       (GObject              *config,
+                                        GParamSpec          **param_specs,
+                                        guint                 n_param_specs,
+                                        GimpContext          *context,
+                                        GimpCreatePickerFunc  create_picker_func,
+                                        gpointer              picker_creator);
+
 #endif /* __GIMP_PROP_GUI_CONSTRUCTORS_H__ */
diff --git a/app/widgets/gimppropgui.c b/app/widgets/gimppropgui.c
index f4b2a5f..d666ed2 100644
--- a/app/widgets/gimppropgui.c
+++ b/app/widgets/gimppropgui.c
@@ -329,6 +329,8 @@ gui_new_funcs[] =
     _gimp_prop_gui_new_convolution_matrix },
   { "GimpGegl-gegl-channel-mixer-config",
     _gimp_prop_gui_new_channel_mixer },
+  { "GimpGegl-gegl-diffraction-patterns-config",
+    _gimp_prop_gui_new_diffraction_patterns },
   { NULL,
     _gimp_prop_gui_new_generic }
 };


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