Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/Remmina/Remmina.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/rmnews.c')
-rw-r--r--src/rmnews.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/rmnews.c b/src/rmnews.c
index 825929494..17427b692 100644
--- a/src/rmnews.c
+++ b/src/rmnews.c
@@ -174,7 +174,7 @@ static gboolean rmnews_dialog_deleted(GtkButton *btn, gpointer user_data)
return FALSE;
}
-static void rmnews_show_news(GtkWindow *parent)
+void rmnews_show_news(GtkWindow *parent)
{
TRACE_CALL(__func__);
@@ -216,13 +216,14 @@ static void rmnews_show_news(GtkWindow *parent)
if (parent)
gtk_window_set_transient_for(GTK_WINDOW(rmnews_news_dialog->dialog), parent);
+ gtk_window_set_modal (GTK_WINDOW(rmnews_news_dialog->dialog), TRUE);
+
/* Show the non-modal news dialog */
gtk_widget_show_all(GTK_WIDGET(rmnews_news_dialog->dialog));
gtk_window_present(GTK_WINDOW(rmnews_news_dialog->dialog));
}
-
static void rmnews_get_url_cb(SoupSession *session, SoupMessage *msg, gpointer data)
{
TRACE_CALL(__func__);
@@ -424,6 +425,13 @@ void rmnews_get_news()
g_info("Output file set to %s", output_file_path);
+ if (remmina_pref.periodic_rmnews_last_get == 0 &&
+ remmina_pref.periodic_rmnews_get_count == 0) {
+ g_file_set_contents (output_file_path, "", 0, NULL);
+ /* Just a symolic date */
+ remmina_pref.periodic_rmnews_last_get = 191469343000;
+ }
+
fd = g_open (output_file_path, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR);
g_debug ("Returned %d while creating %s", fd, output_file_path);
/* If we cannot create the remmina_news file, we avoid connections */