[geany/geany] 3031ac: Check disk status when Geany enters foreground
Jiří Techet
git-noreply at xxxxx
Wed Mar 4 11:40:45 UTC 2015
Branch: refs/heads/master
Author: Jiří Techet <techet at gmail.com>
Committer: Jiří Techet <techet at gmail.com>
Date: Wed, 04 Mar 2015 11:40:45 UTC
Commit: 3031ac7e410b346950d2651f8fa53e96d6a7e173
https://github.com/geany/geany/commit/3031ac7e410b346950d2651f8fa53e96d6a7e173
Log Message:
-----------
Check disk status when Geany enters foreground
Since we have a simple way to check Geany has entered foreground
on OS X, use it to check the current document's disk status.
Modified Paths:
--------------
src/osx.c
Modified: src/osx.c
10 lines changed, 10 insertions(+), 0 deletions(-)
===================================================================
@@ -86,6 +86,14 @@ static void on_new_window(GtkMenuItem *menuitem, G_GNUC_UNUSED gpointer user_dat
}
+static void app_active_cb(GtkosxApplication* app, G_GNUC_UNUSED gpointer user_data)
+{
+ GeanyDocument *doc = document_get_current();
+ if (doc)
+ document_check_disk_status(doc, TRUE);
+}
+
+
void osx_ui_init(void)
{
GtkWidget *item, *menu;
@@ -110,6 +118,8 @@ void osx_ui_init(void)
G_CALLBACK(app_block_termination_cb), NULL);
g_signal_connect(osx_app, "NSApplicationOpenFile",
G_CALLBACK(app_open_file_cb), NULL);
+ g_signal_connect(osx_app, "NSApplicationDidBecomeActive",
+ G_CALLBACK(app_active_cb), NULL);
menu = gtk_menu_new();
item = gtk_menu_item_new_with_label("New Window");
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list