AppImage version update notification
[geeqie.git] / src / preferences.cc
index cf3275b..9fd6937 100644 (file)
@@ -353,6 +353,8 @@ static void config_window_apply(void)
 
        options->image.enable_read_ahead = c_options->image.enable_read_ahead;
 
+       options->appimage_notifications = c_options->appimage_notifications;
+
 
        if (options->image.use_custom_border_color != c_options->image.use_custom_border_color
            || options->image.use_custom_border_color_in_fullscreen != c_options->image.use_custom_border_color_in_fullscreen
@@ -2148,6 +2150,17 @@ static void config_tab_general(GtkWidget *notebook)
 
        pref_spacer(group, PREF_PAD_GROUP);
 
+       if (g_getenv("APPDIR") && strstr(g_getenv("APPDIR"), "/tmp/.mount_Geeqie"))
+               {
+               group = pref_group_new(vbox, FALSE, _("AppImage updates notifications"), GTK_ORIENTATION_VERTICAL);
+               hbox = pref_box_new(group, TRUE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE);
+               pref_checkbox_new_int(group, _("Enable"), options->appimage_notifications, &c_options->appimage_notifications);
+               gtk_widget_set_tooltip_text(group, _("Show a notification on start-up if the server has a newer version than the current. Requires an Internet connection"));
+
+               pref_spacer(group, PREF_PAD_GROUP);
+               }
+
+
        net_mon = g_network_monitor_get_default();
        tz_org = g_network_address_parse_uri(TIMEZONE_DATABASE_WEB, 80, NULL);
        if (tz_org)