[geany/geany-plugins] 9f9627: Merge branch 'master' of github.com:geany/geany-plugins

Dimitar Zhekov git-noreply at xxxxx
Sat Mar 7 13:19:34 UTC 2015


Branch:      refs/heads/master
Author:      Dimitar Zhekov <dimitar.zhekov at gmail.com>
Committer:   Dimitar Zhekov <dimitar.zhekov at gmail.com>
Date:        Sat, 07 Mar 2015 13:19:34 UTC
Commit:      9f962756fb5e18ff8c9c1410c29e047d40ff8e84
             https://github.com/geany/geany-plugins/commit/9f962756fb5e18ff8c9c1410c29e047d40ff8e84

Log Message:
-----------
Merge branch 'master' of github.com:geany/geany-plugins


Modified Paths:
--------------
    debugger/src/dconfig.c
    geanylua/glspi_sci.c
    git-changebar/src/gcb-plugin.c

Modified: debugger/src/dconfig.c
2 lines changed, 2 insertions(+), 0 deletions(-)
===================================================================
@@ -392,6 +392,8 @@ void config_set_panel(int config_part, gpointer config_value, ...)
 		}
 	}
 	
+	va_end(ap);
+	
 	panel_config_changed = TRUE;
 	g_mutex_unlock(change_config_mutex);
 }


Modified: geanylua/glspi_sci.c
3 lines changed, 1 insertions(+), 2 deletions(-)
===================================================================
@@ -229,7 +229,7 @@ static gint glspi_batch(lua_State* L)
 /* Return the "word" at the given position */
 static gint glspi_word(lua_State* L)
 {
-	const gchar* word_chars = NULL;
+	const gchar* word_chars = GEANY_WORDCHARS;
 	gint pos,linenum, bol, bow, eow;
 	gchar *text=NULL;
 	DOC_REQUIRED
@@ -251,7 +251,6 @@ static gint glspi_word(lua_State* L)
 		if (lua_isstring(L, -1)) {
 			word_chars=lua_tostring(L, -1);
 		} else {
-			word_chars=GEANY_WORDCHARS;
 			lua_getglobal(L, LUA_MODULE_NAME);
 			lua_pushstring(L,tokenWordChars);
 			lua_pushstring(L,word_chars);


Modified: git-changebar/src/gcb-plugin.c
47 lines changed, 13 insertions(+), 34 deletions(-)
===================================================================
@@ -112,16 +112,11 @@ struct GotoNextHunkData {
 };
 
 
-static void         on_git_head_changed         (GFileMonitor     *monitor,
+static void         on_git_repo_changed         (GFileMonitor     *monitor,
                                                  GFile            *file,
                                                  GFile            *other_file,
                                                  GFileMonitorEvent event_type,
-                                                 gpointer          user_data);
-static void         on_git_ref_changed          (GFileMonitor     *monitor,
-                                                 GFile            *file,
-                                                 GFile            *other_file,
-                                                 GFileMonitorEvent event_type,
-                                                 gpointer          user_data);
+                                                 gpointer          force);
 static gboolean     on_sci_query_tooltip        (GtkWidget   *widget,
                                                  gint         x,
                                                  gint         y,
@@ -327,11 +322,11 @@ worker_thread (gpointer data)
         /* we need to monitor HEAD, in case of e.g. branch switch (e.g.
          * git checkout -b will switch the ref we need to watch) */
         monitors[0] = monitor_repo_file (repo, "HEAD",
-                                         G_CALLBACK (on_git_head_changed),
-                                         job->user_data);
+                                         G_CALLBACK (on_git_repo_changed),
+                                         GINT_TO_POINTER (TRUE));
         /* and of course the real ref (branch) for when changes get committed */
-        monitors[1] = monitor_head_ref (repo, G_CALLBACK (on_git_ref_changed),
-                                        job->user_data);
+        monitors[1] = monitor_head_ref (repo, G_CALLBACK (on_git_repo_changed),
+                                        GINT_TO_POINTER (FALSE));
       }
     }
     
@@ -359,7 +354,6 @@ worker_thread (gpointer data)
   return NULL;
 }
 
-/* @user_data will also be used to the file monitor callback */
 static void
 get_cached_blob_async (const gchar   *path,
                        gboolean       force,
@@ -872,32 +866,17 @@ on_startup_complete (GObject *obj,
 }
 
 static void
-on_git_head_changed (GFileMonitor      *monitor,
-                     GFile             *file,
-                     GFile             *other_file,
-                     GFileMonitorEvent  event_type,
-                     gpointer           user_data)
+on_git_repo_changed (GFileMonitor     *monitor,
+                     GFile            *file,
+                     GFile            *other_file,
+                     GFileMonitorEvent event_type,
+                     gpointer          force)
 {
-  GeanyDocument *doc = document_find_by_id (GPOINTER_TO_UINT (user_data));
-  
-  if (doc) {
-    clear_cached_blob ();
-    update_diff_push (doc, TRUE);
-  }
-}
-
-static void
-on_git_ref_changed (GFileMonitor      *monitor,
-                    GFile             *file,
-                    GFile             *other_file,
-                    GFileMonitorEvent  event_type,
-                    gpointer           user_data)
-{
-  GeanyDocument *doc = document_find_by_id (GPOINTER_TO_UINT (user_data));
+  GeanyDocument *doc = document_get_current ();
   
   if (doc) {
     clear_cached_blob ();
-    update_diff_push (doc, FALSE);
+    update_diff_push (doc, GPOINTER_TO_INT (force));
   }
 }
 



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Plugins-Commits mailing list