diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2018-07-09 12:10:38 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2018-07-09 12:10:38 +0200 |
commit | 709e2d6f5652ec90c194a4ec2b530bebc6f952cb (patch) | |
tree | 496b2f3899e1d5728ee9ae76095cc5056c317447 /src/util/system.c | |
parent | f1353e9ffd34db5f755c7da0b3f9c10638fbfd38 (diff) | |
parent | 5c8be07095cc04a6d8a95204b0504fd7ab030154 (diff) |
Merge branch 'release/0.28.3-1'0.28.3-1
Diffstat (limited to 'src/util/system.c')
-rw-r--r-- | src/util/system.c | 173 |
1 files changed, 97 insertions, 76 deletions
diff --git a/src/util/system.c b/src/util/system.c index d099120..958256c 100644 --- a/src/util/system.c +++ b/src/util/system.c @@ -1,4 +1,4 @@ -/* system.c generated by valac 0.36.6, the Vala compiler +/* system.c generated by valac 0.40.4, the Vala compiler * generated from system.vala, do not modify */ /* Copyright 2016 Software Freedom Conservancy Inc. @@ -8,6 +8,7 @@ */ /* Return the directory in which Shotwell is installed, or null if uninstalled.*/ + #include <glib.h> #include <glib-object.h> #include <gio/gio.h> @@ -25,142 +26,162 @@ GFile* get_sys_install_dir (GFile* exec_dir); #define RESOURCES_PREFIX _PREFIX gchar* get_nautilus_install_location (void); -void sys_show_uri (GdkScreen* screen, const gchar* uri, GError** error); -void show_file_in_nautilus (const gchar* filename, GError** error); +void sys_show_uri (GdkScreen* screen, + const gchar* uri, + GError** error); +void show_file_in_nautilus (const gchar* filename, + GError** error); -GFile* get_sys_install_dir (GFile* exec_dir) { +GFile* +get_sys_install_dir (GFile* exec_dir) +{ GFile* result = NULL; GFile* child = NULL; GFile* _tmp0_; GFile* _tmp1_; - GFile* _tmp2_; + gchar* _tmp2_; gchar* _tmp3_; - gchar* _tmp4_; - gboolean _tmp5_; - gboolean _tmp6_; + gboolean _tmp4_; #line 8 "/home/jens/Source/shotwell/src/util/system.vala" g_return_val_if_fail (G_IS_FILE (exec_dir), NULL); #line 10 "/home/jens/Source/shotwell/src/util/system.vala" - _tmp0_ = exec_dir; -#line 10 "/home/jens/Source/shotwell/src/util/system.vala" - _tmp1_ = g_file_get_child (_tmp0_, "ui"); + _tmp0_ = g_file_get_child (exec_dir, "ui"); #line 10 "/home/jens/Source/shotwell/src/util/system.vala" - child = _tmp1_; + child = _tmp0_; #line 12 "/home/jens/Source/shotwell/src/util/system.vala" - _tmp2_ = child; + _tmp1_ = child; #line 12 "/home/jens/Source/shotwell/src/util/system.vala" - _tmp3_ = g_file_get_path (_tmp2_); + _tmp2_ = g_file_get_path (_tmp1_); #line 12 "/home/jens/Source/shotwell/src/util/system.vala" - _tmp4_ = _tmp3_; -#line 12 "/home/jens/Source/shotwell/src/util/system.vala" - _tmp5_ = g_file_test (_tmp4_, G_FILE_TEST_IS_DIR | G_FILE_TEST_EXISTS); + _tmp3_ = _tmp2_; #line 12 "/home/jens/Source/shotwell/src/util/system.vala" - _tmp6_ = !_tmp5_; + _tmp4_ = !g_file_test (_tmp3_, G_FILE_TEST_IS_DIR | G_FILE_TEST_EXISTS); #line 12 "/home/jens/Source/shotwell/src/util/system.vala" - _g_free0 (_tmp4_); + _g_free0 (_tmp3_); #line 12 "/home/jens/Source/shotwell/src/util/system.vala" - if (_tmp6_) { + if (_tmp4_) { #line 65 "system.c" - GFile* _tmp7_; -#line 13 "/home/jens/Source/shotwell/src/util/system.vala" - _tmp7_ = g_file_new_for_path (RESOURCES_PREFIX); -#line 13 "/home/jens/Source/shotwell/src/util/system.vala" - result = _tmp7_; -#line 13 "/home/jens/Source/shotwell/src/util/system.vala" + gchar* _tmp5_; + gchar* _tmp6_; + gboolean _tmp7_; + GFile* _tmp8_; +#line 14 "/home/jens/Source/shotwell/src/util/system.vala" + _tmp5_ = g_file_get_basename (exec_dir); +#line 14 "/home/jens/Source/shotwell/src/util/system.vala" + _tmp6_ = _tmp5_; +#line 14 "/home/jens/Source/shotwell/src/util/system.vala" + _tmp7_ = g_strcmp0 (_tmp6_, "src") == 0; +#line 14 "/home/jens/Source/shotwell/src/util/system.vala" + _g_free0 (_tmp6_); +#line 14 "/home/jens/Source/shotwell/src/util/system.vala" + if (_tmp7_) { +#line 15 "/home/jens/Source/shotwell/src/util/system.vala" + result = NULL; +#line 15 "/home/jens/Source/shotwell/src/util/system.vala" + _g_object_unref0 (child); +#line 15 "/home/jens/Source/shotwell/src/util/system.vala" + return result; +#line 86 "system.c" + } +#line 18 "/home/jens/Source/shotwell/src/util/system.vala" + _tmp8_ = g_file_new_for_path (RESOURCES_PREFIX); +#line 18 "/home/jens/Source/shotwell/src/util/system.vala" + result = _tmp8_; +#line 18 "/home/jens/Source/shotwell/src/util/system.vala" _g_object_unref0 (child); -#line 13 "/home/jens/Source/shotwell/src/util/system.vala" +#line 18 "/home/jens/Source/shotwell/src/util/system.vala" return result; -#line 75 "system.c" +#line 96 "system.c" } -#line 16 "/home/jens/Source/shotwell/src/util/system.vala" +#line 21 "/home/jens/Source/shotwell/src/util/system.vala" result = NULL; -#line 16 "/home/jens/Source/shotwell/src/util/system.vala" +#line 21 "/home/jens/Source/shotwell/src/util/system.vala" _g_object_unref0 (child); -#line 16 "/home/jens/Source/shotwell/src/util/system.vala" +#line 21 "/home/jens/Source/shotwell/src/util/system.vala" return result; -#line 83 "system.c" +#line 104 "system.c" } -gchar* get_nautilus_install_location (void) { +gchar* +get_nautilus_install_location (void) +{ gchar* result = NULL; gchar* _tmp0_; -#line 20 "/home/jens/Source/shotwell/src/util/system.vala" +#line 25 "/home/jens/Source/shotwell/src/util/system.vala" _tmp0_ = g_find_program_in_path ("nautilus"); -#line 20 "/home/jens/Source/shotwell/src/util/system.vala" +#line 25 "/home/jens/Source/shotwell/src/util/system.vala" result = _tmp0_; -#line 20 "/home/jens/Source/shotwell/src/util/system.vala" +#line 25 "/home/jens/Source/shotwell/src/util/system.vala" return result; -#line 96 "system.c" +#line 119 "system.c" } -void sys_show_uri (GdkScreen* screen, const gchar* uri, GError** error) { - GdkScreen* _tmp0_; - const gchar* _tmp1_; +void +sys_show_uri (GdkScreen* screen, + const gchar* uri, + GError** error) +{ GError * _inner_error_ = NULL; -#line 23 "/home/jens/Source/shotwell/src/util/system.vala" +#line 28 "/home/jens/Source/shotwell/src/util/system.vala" g_return_if_fail (GDK_IS_SCREEN (screen)); -#line 23 "/home/jens/Source/shotwell/src/util/system.vala" +#line 28 "/home/jens/Source/shotwell/src/util/system.vala" g_return_if_fail (uri != NULL); -#line 24 "/home/jens/Source/shotwell/src/util/system.vala" - _tmp0_ = screen; -#line 24 "/home/jens/Source/shotwell/src/util/system.vala" - _tmp1_ = uri; -#line 24 "/home/jens/Source/shotwell/src/util/system.vala" - gtk_show_uri (_tmp0_, _tmp1_, (guint32) GDK_CURRENT_TIME, &_inner_error_); -#line 24 "/home/jens/Source/shotwell/src/util/system.vala" +#line 29 "/home/jens/Source/shotwell/src/util/system.vala" + gtk_show_uri (screen, uri, (guint32) GDK_CURRENT_TIME, &_inner_error_); +#line 29 "/home/jens/Source/shotwell/src/util/system.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 24 "/home/jens/Source/shotwell/src/util/system.vala" +#line 29 "/home/jens/Source/shotwell/src/util/system.vala" g_propagate_error (error, _inner_error_); -#line 24 "/home/jens/Source/shotwell/src/util/system.vala" +#line 29 "/home/jens/Source/shotwell/src/util/system.vala" return; -#line 120 "system.c" +#line 141 "system.c" } } -void show_file_in_nautilus (const gchar* filename, GError** error) { +void +show_file_in_nautilus (const gchar* filename, + GError** error) +{ gchar* _tmp0_; gchar* _tmp1_; gchar* _tmp2_; gchar* _tmp3_; - const gchar* _tmp4_; + gchar* _tmp4_; gchar* _tmp5_; - gchar* _tmp6_; GError * _inner_error_ = NULL; -#line 27 "/home/jens/Source/shotwell/src/util/system.vala" +#line 32 "/home/jens/Source/shotwell/src/util/system.vala" g_return_if_fail (filename != NULL); -#line 28 "/home/jens/Source/shotwell/src/util/system.vala" +#line 33 "/home/jens/Source/shotwell/src/util/system.vala" _tmp0_ = get_nautilus_install_location (); -#line 28 "/home/jens/Source/shotwell/src/util/system.vala" +#line 33 "/home/jens/Source/shotwell/src/util/system.vala" _tmp1_ = _tmp0_; -#line 28 "/home/jens/Source/shotwell/src/util/system.vala" +#line 33 "/home/jens/Source/shotwell/src/util/system.vala" _tmp2_ = g_strconcat (_tmp1_, " ", NULL); -#line 28 "/home/jens/Source/shotwell/src/util/system.vala" +#line 33 "/home/jens/Source/shotwell/src/util/system.vala" _tmp3_ = _tmp2_; -#line 28 "/home/jens/Source/shotwell/src/util/system.vala" - _tmp4_ = filename; -#line 28 "/home/jens/Source/shotwell/src/util/system.vala" - _tmp5_ = g_strconcat (_tmp3_, _tmp4_, NULL); -#line 28 "/home/jens/Source/shotwell/src/util/system.vala" - _tmp6_ = _tmp5_; -#line 28 "/home/jens/Source/shotwell/src/util/system.vala" - g_spawn_command_line_async (_tmp6_, &_inner_error_); -#line 28 "/home/jens/Source/shotwell/src/util/system.vala" - _g_free0 (_tmp6_); -#line 28 "/home/jens/Source/shotwell/src/util/system.vala" +#line 33 "/home/jens/Source/shotwell/src/util/system.vala" + _tmp4_ = g_strconcat (_tmp3_, filename, NULL); +#line 33 "/home/jens/Source/shotwell/src/util/system.vala" + _tmp5_ = _tmp4_; +#line 33 "/home/jens/Source/shotwell/src/util/system.vala" + g_spawn_command_line_async (_tmp5_, &_inner_error_); +#line 33 "/home/jens/Source/shotwell/src/util/system.vala" + _g_free0 (_tmp5_); +#line 33 "/home/jens/Source/shotwell/src/util/system.vala" _g_free0 (_tmp3_); -#line 28 "/home/jens/Source/shotwell/src/util/system.vala" +#line 33 "/home/jens/Source/shotwell/src/util/system.vala" _g_free0 (_tmp1_); -#line 28 "/home/jens/Source/shotwell/src/util/system.vala" +#line 33 "/home/jens/Source/shotwell/src/util/system.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 28 "/home/jens/Source/shotwell/src/util/system.vala" +#line 33 "/home/jens/Source/shotwell/src/util/system.vala" g_propagate_error (error, _inner_error_); -#line 28 "/home/jens/Source/shotwell/src/util/system.vala" +#line 33 "/home/jens/Source/shotwell/src/util/system.vala" return; -#line 164 "system.c" +#line 185 "system.c" } } |