Merge branch 'master' of git://github.com/geany/geany
This commit is contained in:
commit
3b884b9190
@ -431,13 +431,6 @@ void on_normal_size1_activate(GtkMenuItem *menuitem, gpointer user_data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static gboolean delayed_check_disk_status(gpointer data)
|
|
||||||
{
|
|
||||||
document_check_disk_status(data, FALSE);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Changes window-title after switching tabs and lots of other things.
|
/* Changes window-title after switching tabs and lots of other things.
|
||||||
* note: using 'after' makes Scintilla redraw before the UI, appearing more responsive */
|
* note: using 'after' makes Scintilla redraw before the UI, appearing more responsive */
|
||||||
static void on_notebook1_switch_page_after(GtkNotebook *notebook, gpointer page,
|
static void on_notebook1_switch_page_after(GtkNotebook *notebook, gpointer page,
|
||||||
@ -462,10 +455,7 @@ static void on_notebook1_switch_page_after(GtkNotebook *notebook, gpointer page,
|
|||||||
sidebar_update_tag_list(doc, FALSE);
|
sidebar_update_tag_list(doc, FALSE);
|
||||||
document_highlight_tags(doc);
|
document_highlight_tags(doc);
|
||||||
|
|
||||||
/* We delay the check to avoid weird fast, unintended switching of notebook pages when
|
document_check_disk_status(doc, TRUE);
|
||||||
* the 'file has changed' dialog is shown while the switch event is not yet completely
|
|
||||||
* finished. So, we check after the switch has been performed to be safe. */
|
|
||||||
g_idle_add(delayed_check_disk_status, doc);
|
|
||||||
|
|
||||||
#ifdef HAVE_VTE
|
#ifdef HAVE_VTE
|
||||||
vte_cwd((doc->real_path != NULL) ? doc->real_path : doc->file_name, FALSE);
|
vte_cwd((doc->real_path != NULL) ? doc->real_path : doc->file_name, FALSE);
|
||||||
|
@ -222,6 +222,15 @@ static void apply_settings(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void on_window_active_changed(GtkWindow *window, GParamSpec *pspec, gpointer data)
|
||||||
|
{
|
||||||
|
GeanyDocument *doc = document_get_current();
|
||||||
|
|
||||||
|
if (doc && gtk_window_is_active(window))
|
||||||
|
document_check_disk_status(doc, TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void main_init(void)
|
static void main_init(void)
|
||||||
{
|
{
|
||||||
/* add our icon path in case we aren't installed in the system prefix */
|
/* add our icon path in case we aren't installed in the system prefix */
|
||||||
@ -248,6 +257,7 @@ static void main_init(void)
|
|||||||
main_status.opening_session_files = FALSE;
|
main_status.opening_session_files = FALSE;
|
||||||
|
|
||||||
main_widgets.window = create_window1();
|
main_widgets.window = create_window1();
|
||||||
|
g_signal_connect(main_widgets.window, "notify::is-active", G_CALLBACK(on_window_active_changed), NULL);
|
||||||
|
|
||||||
/* add recent projects to the Project menu */
|
/* add recent projects to the Project menu */
|
||||||
ui_widgets.recent_projects_menuitem = ui_lookup_widget(main_widgets.window, "recent_projects1");
|
ui_widgets.recent_projects_menuitem = ui_lookup_widget(main_widgets.window, "recent_projects1");
|
||||||
|
10
src/osx.c
10
src/osx.c
@ -86,14 +86,6 @@ 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)
|
void osx_ui_init(void)
|
||||||
{
|
{
|
||||||
GtkWidget *item, *menu;
|
GtkWidget *item, *menu;
|
||||||
@ -118,8 +110,6 @@ void osx_ui_init(void)
|
|||||||
G_CALLBACK(app_block_termination_cb), NULL);
|
G_CALLBACK(app_block_termination_cb), NULL);
|
||||||
g_signal_connect(osx_app, "NSApplicationOpenFile",
|
g_signal_connect(osx_app, "NSApplicationOpenFile",
|
||||||
G_CALLBACK(app_open_file_cb), NULL);
|
G_CALLBACK(app_open_file_cb), NULL);
|
||||||
g_signal_connect(osx_app, "NSApplicationDidBecomeActive",
|
|
||||||
G_CALLBACK(app_active_cb), NULL);
|
|
||||||
|
|
||||||
menu = gtk_menu_new();
|
menu = gtk_menu_new();
|
||||||
item = gtk_menu_item_new_with_label("New Window");
|
item = gtk_menu_item_new_with_label("New Window");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user