Branch: refs/heads/master
Author: Jiří Techet <techet(a)gmail.com>
Committer: Jiří Techet <techet(a)gmail.com>
Date: Wed, 04 Mar 2015 13:34:55 UTC
Commit: 51ce1018cccbc6a6c0c3614d1d4e29daea9ab606
https://github.com/geany/geany/commit/51ce1018cccbc6a6c0c3614d1d4e29daea9ab…
Log Message:
-----------
Always use absolute path when opening projects from command-line
At the moment when geany project is loaded from commandline using
e.g. "geany myproject.geany", the relative path is used by geany
so e.g. Project->Recent Projects shows the relative path instead of
the absolute one (also if the project is already in the list with an absolute
path, additional entry with relative path is created).
Use main_get_argv_filename(), which is already used for ordinary files,
also for opening .geany files.
Modified Paths:
--------------
src/main.c
Modified: src/main.c
5 lines changed, 4 insertions(+), 1 deletions(-)
===================================================================
@@ -932,11 +932,14 @@ static void load_startup_files(gint argc, gchar **argv)
if (argc > 1 && g_str_has_suffix(argv[1], ".geany"))
{
+ gchar *filename = main_get_argv_filename(argv[1]);
+
/* project file specified: load it, but decide the session later */
- main_load_project_from_command_line(argv[1], FALSE);
+ main_load_project_from_command_line(filename, FALSE);
argc--, argv++;
/* force session load if using project-based session files */
load_session = project_prefs.project_session;
+ g_free(filename);
}
/* Load the default session if:
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Jiří Techet <techet(a)gmail.com>
Committer: Jiří Techet <techet(a)gmail.com>
Date: Wed, 04 Mar 2015 11:40:45 UTC
Commit: 2e1dc7aebac720f58c71bb2decee9421713cf883
https://github.com/geany/geany/commit/2e1dc7aebac720f58c71bb2decee9421713cf…
Log Message:
-----------
Don't use expose-event/draw signals of the menu
The expose-event/draw signals were used to reenable the menu
after it has been disabled when VTE overrides the given keybinding.
This doesn't work on OS X where GtkMenuBar isn't displayed
(there may be a similar problem with the global menubar on
Ubuntu).
The reason why these signals were used was probably slight
flickering of the menubar when using ordinary g_idle_add() to
reenable the menu (the dimmed menu gets drawn after which
it gets reenabled and redrawn non-dimmed). It is however possible
to use idle function with higher than redraw priority in which case
the menu is enabled before the redraw so the dimmed menu
isn't drawn at all.
Fixes https://sourceforge.net/p/geany/bugs/1081/
Modified Paths:
--------------
src/keybindings.c
Modified: src/keybindings.c
28 lines changed, 1 insertions(+), 27 deletions(-)
===================================================================
@@ -1101,23 +1101,6 @@ static gboolean check_menu_key(GeanyDocument *doc, guint keyval, guint state, gu
#ifdef HAVE_VTE
-static gboolean on_menu_expose_event(GtkWidget *widget, GdkEventExpose *event,
- gpointer user_data)
-{
- if (!gtk_widget_get_sensitive(widget))
- gtk_widget_set_sensitive(GTK_WIDGET(widget), TRUE);
- return FALSE;
-}
-
-
-#if GTK_CHECK_VERSION(3, 0, 0)
-static gboolean on_menu_draw(GtkWidget *widget, cairo_t *cr, gpointer user_data)
-{
- return on_menu_expose_event(widget, NULL, user_data);
-}
-#endif
-
-
static gboolean set_sensitive(gpointer widget)
{
gtk_widget_set_sensitive(GTK_WIDGET(widget), TRUE);
@@ -1158,16 +1141,7 @@ static gboolean check_vte(GdkModifierType state, guint keyval)
* Note: maybe there's a better way of doing this ;-) */
widget = ui_lookup_widget(main_widgets.window, "menubar1");
gtk_widget_set_sensitive(widget, FALSE);
- {
- /* make the menubar sensitive before it is redrawn */
- static gboolean connected = FALSE;
- if (!connected)
-#if GTK_CHECK_VERSION(3, 0, 0)
- g_signal_connect(widget, "draw", G_CALLBACK(on_menu_draw), NULL);
-#else
- g_signal_connect(widget, "expose-event", G_CALLBACK(on_menu_expose_event), NULL);
-#endif
- }
+ g_idle_add_full(G_PRIORITY_HIGH, set_sensitive, widget, NULL);
widget = main_widgets.editor_menu;
gtk_widget_set_sensitive(widget, FALSE);
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).