summaryrefslogtreecommitdiff
path: root/src/dialogs/MultiTextEntryDialog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dialogs/MultiTextEntryDialog.c')
-rw-r--r--src/dialogs/MultiTextEntryDialog.c173
1 files changed, 90 insertions, 83 deletions
diff --git a/src/dialogs/MultiTextEntryDialog.c b/src/dialogs/MultiTextEntryDialog.c
index 7e682a6..e33e415 100644
--- a/src/dialogs/MultiTextEntryDialog.c
+++ b/src/dialogs/MultiTextEntryDialog.c
@@ -1,4 +1,4 @@
-/* MultiTextEntryDialog.c generated by valac 0.36.6, the Vala compiler
+/* MultiTextEntryDialog.c generated by valac 0.40.4, the Vala compiler
* generated from MultiTextEntryDialog.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.
@@ -8,6 +8,7 @@
* See the COPYING file in this distribution.
*/
+
#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
@@ -25,6 +26,11 @@
typedef struct _MultiTextEntryDialog MultiTextEntryDialog;
typedef struct _MultiTextEntryDialogClass MultiTextEntryDialogClass;
typedef struct _MultiTextEntryDialogPrivate MultiTextEntryDialogPrivate;
+enum {
+ MULTI_TEXT_ENTRY_DIALOG_0_PROPERTY,
+ MULTI_TEXT_ENTRY_DIALOG_NUM_PROPERTIES
+};
+static GParamSpec* multi_text_entry_dialog_properties[MULTI_TEXT_ENTRY_DIALOG_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define TYPE_PAGE_WINDOW (page_window_get_type ())
@@ -69,13 +75,15 @@ static gpointer multi_text_entry_dialog_parent_class = NULL;
GType multi_text_entry_dialog_get_type (void) G_GNUC_CONST;
#define MULTI_TEXT_ENTRY_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_MULTI_TEXT_ENTRY_DIALOG, MultiTextEntryDialogPrivate))
-enum {
- MULTI_TEXT_ENTRY_DIALOG_DUMMY_PROPERTY
-};
MultiTextEntryDialog* multi_text_entry_dialog_new (void);
MultiTextEntryDialog* multi_text_entry_dialog_construct (GType object_type);
gint resources_use_header_bar (void);
-void multi_text_entry_dialog_setup (MultiTextEntryDialog* self, MultiTextEntryDialogOnModifyValidateType modify_validate, void* modify_validate_target, const gchar* title, const gchar* label, const gchar* initial_text);
+void multi_text_entry_dialog_setup (MultiTextEntryDialog* self,
+ MultiTextEntryDialogOnModifyValidateType modify_validate,
+ void* modify_validate_target,
+ const gchar* title,
+ const gchar* label,
+ const gchar* initial_text);
GType page_window_get_type (void) G_GNUC_CONST;
GType app_window_get_type (void) G_GNUC_CONST;
AppWindow* app_window_get_instance (void);
@@ -83,41 +91,45 @@ gchar* multi_text_entry_dialog_execute (MultiTextEntryDialog* self);
static void multi_text_entry_dialog_finalize (GObject * obj);
-MultiTextEntryDialog* multi_text_entry_dialog_construct (GType object_type) {
+MultiTextEntryDialog*
+multi_text_entry_dialog_construct (GType object_type)
+{
MultiTextEntryDialog * self = NULL;
- gint _tmp0_;
-#line 17 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- _tmp0_ = resources_use_header_bar ();
#line 17 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- self = (MultiTextEntryDialog*) g_object_new (object_type, "use-header-bar", _tmp0_, NULL);
+ self = (MultiTextEntryDialog*) g_object_new (object_type, "use-header-bar", resources_use_header_bar (), NULL);
#line 16 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
return self;
-#line 96 "MultiTextEntryDialog.c"
+#line 103 "MultiTextEntryDialog.c"
}
-MultiTextEntryDialog* multi_text_entry_dialog_new (void) {
+MultiTextEntryDialog*
+multi_text_entry_dialog_new (void)
+{
#line 16 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
return multi_text_entry_dialog_construct (TYPE_MULTI_TEXT_ENTRY_DIALOG);
-#line 103 "MultiTextEntryDialog.c"
+#line 112 "MultiTextEntryDialog.c"
}
-void multi_text_entry_dialog_setup (MultiTextEntryDialog* self, MultiTextEntryDialogOnModifyValidateType modify_validate, void* modify_validate_target, const gchar* title, const gchar* label, const gchar* initial_text) {
- const gchar* _tmp0_;
+void
+multi_text_entry_dialog_setup (MultiTextEntryDialog* self,
+ MultiTextEntryDialogOnModifyValidateType modify_validate,
+ void* modify_validate_target,
+ const gchar* title,
+ const gchar* label,
+ const gchar* initial_text)
+{
+ AppWindow* _tmp0_;
AppWindow* _tmp1_;
- AppWindow* _tmp2_;
- GdkWindow* _tmp3_;
+ GdkWindow* _tmp2_;
+ AppWindow* _tmp3_;
AppWindow* _tmp4_;
- AppWindow* _tmp5_;
- MultiTextEntryDialogOnModifyValidateType _tmp6_;
- void* _tmp6__target;
- const gchar* _tmp7_ = NULL;
- const gchar* _tmp8_;
- GtkTextView* _tmp10_;
- GtkTextBuffer* _tmp11_;
- GtkTextBuffer* _tmp12_;
- GtkTextView* _tmp13_;
+ const gchar* _tmp5_ = NULL;
+ GtkTextView* _tmp6_;
+ GtkTextBuffer* _tmp7_;
+ GtkTextBuffer* _tmp8_;
+ GtkTextView* _tmp9_;
#line 20 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
g_return_if_fail (IS_MULTI_TEXT_ENTRY_DIALOG (self));
#line 20 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
@@ -125,71 +137,60 @@ void multi_text_entry_dialog_setup (MultiTextEntryDialog* self, MultiTextEntryDi
#line 20 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
g_return_if_fail (label != NULL);
#line 21 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- _tmp0_ = title;
-#line 21 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- gtk_window_set_title (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), _tmp0_);
+ gtk_window_set_title (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), title);
#line 22 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- _tmp1_ = app_window_get_instance ();
+ _tmp0_ = app_window_get_instance ();
#line 22 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- _tmp2_ = _tmp1_;
+ _tmp1_ = _tmp0_;
#line 22 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- _tmp3_ = gtk_widget_get_parent_window (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget));
+ _tmp2_ = gtk_widget_get_parent_window (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_widget_get_type (), GtkWidget));
#line 22 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- gtk_widget_set_parent_window (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), _tmp3_);
+ gtk_widget_set_parent_window (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), _tmp2_);
#line 22 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- _g_object_unref0 (_tmp2_);
+ _g_object_unref0 (_tmp1_);
#line 23 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- _tmp4_ = app_window_get_instance ();
+ _tmp3_ = app_window_get_instance ();
#line 23 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- _tmp5_ = _tmp4_;
+ _tmp4_ = _tmp3_;
#line 23 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- gtk_window_set_transient_for (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_window_get_type (), GtkWindow));
+ gtk_window_set_transient_for (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_window_get_type (), GtkWindow));
#line 23 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- _g_object_unref0 (_tmp5_);
-#line 24 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- _tmp6_ = modify_validate;
-#line 24 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- _tmp6__target = modify_validate_target;
+ _g_object_unref0 (_tmp4_);
#line 24 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- self->priv->on_modify_validate = _tmp6_;
+ self->priv->on_modify_validate = modify_validate;
#line 24 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- self->priv->on_modify_validate_target = _tmp6__target;
+ self->priv->on_modify_validate_target = modify_validate_target;
#line 26 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- _tmp8_ = initial_text;
+ if (initial_text != NULL) {
#line 26 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- if (_tmp8_ != NULL) {
-#line 162 "MultiTextEntryDialog.c"
- const gchar* _tmp9_;
-#line 26 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- _tmp9_ = initial_text;
-#line 26 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- _tmp7_ = _tmp9_;
+ _tmp5_ = initial_text;
#line 168 "MultiTextEntryDialog.c"
} else {
#line 26 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- _tmp7_ = "";
+ _tmp5_ = "";
#line 172 "MultiTextEntryDialog.c"
}
#line 26 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- _tmp10_ = self->priv->entry;
+ _tmp6_ = self->priv->entry;
#line 26 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- _tmp11_ = gtk_text_view_get_buffer (_tmp10_);
+ _tmp7_ = gtk_text_view_get_buffer (_tmp6_);
#line 26 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- _tmp12_ = _tmp11_;
+ _tmp8_ = _tmp7_;
#line 26 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- g_object_set (_tmp12_, "text", _tmp7_, NULL);
+ g_object_set (_tmp8_, "text", _tmp5_, NULL);
#line 28 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- _tmp13_ = self->priv->entry;
+ _tmp9_ = self->priv->entry;
#line 28 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, gtk_widget_get_type (), GtkWidget));
+ gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_widget_get_type (), GtkWidget));
#line 186 "MultiTextEntryDialog.c"
}
-gchar* multi_text_entry_dialog_execute (MultiTextEntryDialog* self) {
+gchar*
+multi_text_entry_dialog_execute (MultiTextEntryDialog* self)
+{
gchar* result = NULL;
gchar* text = NULL;
- gint _tmp0_;
#line 31 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
g_return_val_if_fail (IS_MULTI_TEXT_ENTRY_DIALOG (self), NULL);
#line 32 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
@@ -197,30 +198,28 @@ gchar* multi_text_entry_dialog_execute (MultiTextEntryDialog* self) {
#line 34 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
#line 36 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- _tmp0_ = gtk_dialog_run (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog));
-#line 36 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- if (_tmp0_ == ((gint) GTK_RESPONSE_OK)) {
-#line 204 "MultiTextEntryDialog.c"
- GtkTextView* _tmp1_;
+ if (gtk_dialog_run (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog)) == ((gint) GTK_RESPONSE_OK)) {
+#line 203 "MultiTextEntryDialog.c"
+ GtkTextView* _tmp0_;
+ GtkTextBuffer* _tmp1_;
GtkTextBuffer* _tmp2_;
- GtkTextBuffer* _tmp3_;
+ gchar* _tmp3_;
gchar* _tmp4_;
- gchar* _tmp5_;
#line 37 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- _tmp1_ = self->priv->entry;
+ _tmp0_ = self->priv->entry;
#line 37 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- _tmp2_ = gtk_text_view_get_buffer (_tmp1_);
+ _tmp1_ = gtk_text_view_get_buffer (_tmp0_);
#line 37 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- _tmp3_ = _tmp2_;
+ _tmp2_ = _tmp1_;
#line 37 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- g_object_get (_tmp3_, "text", &_tmp4_, NULL);
+ g_object_get (_tmp2_, "text", &_tmp3_, NULL);
#line 37 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- _tmp5_ = _tmp4_;
+ _tmp4_ = _tmp3_;
#line 37 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
_g_free0 (text);
#line 37 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
- text = _tmp5_;
-#line 224 "MultiTextEntryDialog.c"
+ text = _tmp4_;
+#line 223 "MultiTextEntryDialog.c"
}
#line 39 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
gtk_widget_destroy (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
@@ -228,11 +227,13 @@ gchar* multi_text_entry_dialog_execute (MultiTextEntryDialog* self) {
result = text;
#line 41 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
return result;
-#line 232 "MultiTextEntryDialog.c"
+#line 231 "MultiTextEntryDialog.c"
}
-static void multi_text_entry_dialog_class_init (MultiTextEntryDialogClass * klass) {
+static void
+multi_text_entry_dialog_class_init (MultiTextEntryDialogClass * klass)
+{
gint MultiTextEntryDialog_private_offset;
#line 9 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
multi_text_entry_dialog_parent_class = g_type_class_peek_parent (klass);
@@ -246,20 +247,24 @@ static void multi_text_entry_dialog_class_init (MultiTextEntryDialogClass * klas
gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/Shotwell/ui/multitextentrydialog.ui");
#line 9 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "entry", FALSE, MultiTextEntryDialog_private_offset + G_STRUCT_OFFSET (MultiTextEntryDialogPrivate, entry));
-#line 250 "MultiTextEntryDialog.c"
+#line 251 "MultiTextEntryDialog.c"
}
-static void multi_text_entry_dialog_instance_init (MultiTextEntryDialog * self) {
+static void
+multi_text_entry_dialog_instance_init (MultiTextEntryDialog * self)
+{
#line 9 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
self->priv = MULTI_TEXT_ENTRY_DIALOG_GET_PRIVATE (self);
#line 9 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
gtk_widget_init_template (GTK_WIDGET (self));
-#line 259 "MultiTextEntryDialog.c"
+#line 262 "MultiTextEntryDialog.c"
}
-static void multi_text_entry_dialog_finalize (GObject * obj) {
+static void
+multi_text_entry_dialog_finalize (GObject * obj)
+{
MultiTextEntryDialog * self;
#line 9 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_MULTI_TEXT_ENTRY_DIALOG, MultiTextEntryDialog);
@@ -267,11 +272,13 @@ static void multi_text_entry_dialog_finalize (GObject * obj) {
_g_object_unref0 (self->priv->entry);
#line 9 "/home/jens/Source/shotwell/src/dialogs/MultiTextEntryDialog.vala"
G_OBJECT_CLASS (multi_text_entry_dialog_parent_class)->finalize (obj);
-#line 271 "MultiTextEntryDialog.c"
+#line 276 "MultiTextEntryDialog.c"
}
-GType multi_text_entry_dialog_get_type (void) {
+GType
+multi_text_entry_dialog_get_type (void)
+{
static volatile gsize multi_text_entry_dialog_type_id__volatile = 0;
if (g_once_init_enter (&multi_text_entry_dialog_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (MultiTextEntryDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) multi_text_entry_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MultiTextEntryDialog), 0, (GInstanceInitFunc) multi_text_entry_dialog_instance_init, NULL };