Revision: 3490
http://geany.svn.sourceforge.net/geany/?rev=3490&view=rev
Author: eht16
Date: 2009-01-19 19:30:18 +0000 (Mon, 19 Jan 2009)
Log Message:
-----------
Skip disk changes detection for all remote files.
Don't try to detect a remote file when running on old GLib versions without GIO (< 2.16).
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/document.c
trunk/src/utils.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-01-19 13:21:57 UTC (rev 3489)
+++ trunk/ChangeLog 2009-01-19 19:30:18 UTC (rev 3490)
@@ -1,3 +1,11 @@
+2009-01-19 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
+
+ * src/document.c, src/utils.c:
+ Skip disk changes detection for all remote files.
+ Don't try to detect a remote file when running on old GLib versions
+ without GIO (< 2.16).
+
+
2009-01-19 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/interface.c, src/ui_utils.h, src/prefs.c, src/plugindata.h,
Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c 2009-01-19 13:21:57 UTC (rev 3489)
+++ trunk/src/document.c 2009-01-19 19:30:18 UTC (rev 3490)
@@ -2809,13 +2809,12 @@
gboolean ret = FALSE;
time_t t;
- if (file_prefs.disk_check_timeout == 0)
+ if (file_prefs.disk_check_timeout == 0 || doc == NULL)
return FALSE;
- if (doc == NULL)
+
+ /* ignore documents that have never been saved to disk and remote files */
+ if (doc->real_path == NULL || doc->priv->is_remote)
return FALSE;
- /* ignore documents that have never been saved to disk */
- if (doc->real_path == NULL)
- return FALSE;
/* check the file's mtime in case we don't have GIO support, otherwise this is a no-op */
t = check_disk_status_real(doc, force);
Modified: trunk/src/utils.c
===================================================================
--- trunk/src/utils.c 2009-01-19 13:21:57 UTC (rev 3489)
+++ trunk/src/utils.c 2009-01-19 19:30:18 UTC (rev 3490)
@@ -1635,9 +1635,11 @@
return TRUE;
#ifndef G_OS_WIN32
+ if (glib_check_version(2, 16, 0) == NULL) /* no need to check for this with GLib < 2.16 */
{
static gchar *fuse_path = NULL;
static gsize len = 0;
+
if (fuse_path == NULL)
{
fuse_path = g_build_filename(g_get_home_dir(), ".gvfs", NULL);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 3485
http://geany.svn.sourceforge.net/geany/?rev=3485&view=rev
Author: eht16
Date: 2009-01-18 18:20:23 +0000 (Sun, 18 Jan 2009)
Log Message:
-----------
Disable the Build menu item in the Build toolbar button explicitly for LaTeX files.
Update the tooltip for the Build toolbar button according to the last used action.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/build.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-01-18 18:19:58 UTC (rev 3484)
+++ trunk/ChangeLog 2009-01-18 18:20:23 UTC (rev 3485)
@@ -14,6 +14,11 @@
If GIO is available, use GFileMonitor to watch for file disk changes
and indicate them immediately using an orange tab label colour.
Break plugin ABI for this and the last commits.
+ * src/build.c:
+ Disable the Build menu item in the Build toolbar button explicitly
+ for LaTeX files.
+ Update the tooltip for the Build toolbar button according to the last
+ used action.
2009-01-17 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/build.c
===================================================================
--- trunk/src/build.c 2009-01-18 18:19:58 UTC (rev 3484)
+++ trunk/src/build.c 2009-01-18 18:20:23 UTC (rev 3485)
@@ -97,6 +97,7 @@
GtkWidget *run_button;
GtkWidget *compile_button;
GtkWidget *build_button;
+ GtkAction *build_action;
GtkWidget *toolitem_build;
GtkWidget *toolitem_make_all;
@@ -1625,10 +1626,12 @@
if (menu_items->item_set_args)
gtk_widget_set_sensitive(menu_items->item_set_args, can_set_args);
- gtk_widget_set_sensitive(widgets.toolitem_build, can_build && ft->actions->can_link);
+ gtk_widget_set_sensitive(widgets.toolitem_build,
+ can_build && ft->actions->can_link && ft->id != GEANY_FILETYPES_LATEX);
gtk_widget_set_sensitive(widgets.toolitem_make_all, can_make);
gtk_widget_set_sensitive(widgets.toolitem_make_custom, can_make);
- gtk_widget_set_sensitive(widgets.toolitem_make_object, can_make);
+ gtk_widget_set_sensitive(widgets.toolitem_make_object,
+ can_make && ft->id != GEANY_FILETYPES_LATEX);
gtk_widget_set_sensitive(widgets.toolitem_set_args, can_set_args);
ui_widget_set_sensitive(widgets.compile_button, can_build && ft->actions->can_compile);
@@ -1804,6 +1807,7 @@
gpointer user_data)
{
last_toolbutton_action = GPOINTER_TO_INT(user_data);
+ g_object_set(widgets.build_action, "tooltip", _("Build the current file"), NULL);
on_build_build_activate(menuitem, user_data);
}
@@ -1872,7 +1876,24 @@
on_toolbutton_make_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
+ gchar *msg;
+
last_toolbutton_action = GPOINTER_TO_INT(user_data);
+ switch (last_toolbutton_action)
+ {
+ case GBO_MAKE_ALL:
+ msg = _("Build the current file with Make and the default target");
+ break;
+ case GBO_MAKE_CUSTOM:
+ msg = _("Build the current file with Make and the specified target");
+ break;
+ case GBO_MAKE_OBJECT:
+ msg = _("Compile the current file with Make");
+ break;
+ default:
+ msg = NULL;
+ }
+ g_object_set(widgets.build_action, "tooltip", msg, NULL);
on_build_make_activate(menuitem, user_data);
}
@@ -2007,9 +2028,11 @@
void build_init()
{
GtkWidget *item;
- GtkWidget *toolmenu = geany_menu_button_action_get_menu(
- GEANY_MENU_BUTTON_ACTION(toolbar_get_action_by_name("Build")));
+ GtkWidget *toolmenu;
+ widgets.build_action = toolbar_get_action_by_name("Build");
+ toolmenu = geany_menu_button_action_get_menu(GEANY_MENU_BUTTON_ACTION(widgets.build_action));
+
if (toolmenu != NULL)
{
/* build the code */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.