[latexila/wip/latexila-next: 37/51] Synctex: make some functions private



commit 94ea7b032af07b0d06e6e7f229b8e024dc06a5e9
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Wed May 21 22:45:17 2014 +0200

    Synctex: make some functions private
    
    latexila_synctex_connect_evince_window_async() and
    latexila_synctex_connect_evince_window_finish()
    were not used outside the file.

 docs/reference/latexila-sections.txt |    2 -
 src/liblatexila/latexila-synctex.c   |   63 +++++++++++----------------------
 src/liblatexila/latexila-synctex.h   |    8 ----
 3 files changed, 21 insertions(+), 52 deletions(-)
---
diff --git a/docs/reference/latexila-sections.txt b/docs/reference/latexila-sections.txt
index 88cf82e..9c5ce08 100644
--- a/docs/reference/latexila-sections.txt
+++ b/docs/reference/latexila-sections.txt
@@ -136,8 +136,6 @@ latexila_build_view_get_type
 LatexilaSynctex
 latexila_synctex_get_instance
 latexila_synctex_connect_evince_window
-latexila_synctex_connect_evince_window_async
-latexila_synctex_connect_evince_window_finish
 latexila_synctex_forward_search
 <SUBSECTION Standard>
 LATEXILA_IS_SYNCTEX
diff --git a/src/liblatexila/latexila-synctex.c b/src/liblatexila/latexila-synctex.c
index b8c501f..0703ecc 100644
--- a/src/liblatexila/latexila-synctex.c
+++ b/src/liblatexila/latexila-synctex.c
@@ -254,7 +254,7 @@ window_proxy_cb (GObject      *object,
 
   data->pdf_uri = NULL;
 
-  /* latexila_synctex_connect_evince_window_async() is finally finished! */
+  /* connect_evince_window_async() is finally finished! */
   g_task_return_boolean (task, TRUE);
   g_object_unref (task);
 }
@@ -389,25 +389,11 @@ daemon_proxy_cb (GObject      *object,
                                     task);
 }
 
-/**
- * latexila_synctex_connect_evince_window_async:
- * @synctex: the #LatexilaSynctex instance.
- * @pdf_uri: the PDF URI
- * @callback: the callback to call when the operation is finished.
- * @user_data: the data to pass to the callback function.
- *
- * Connects asynchronously the evince window for @pdf_uri. LaTeXila will then
- * listen the signals emitted by the evince window when the user wants to switch
- * from the PDF to the corresponding *.tex file.
- *
- * The callback will be called when the operation is finished. You can then call
- * latexila_synctex_connect_evince_window_finish().
- */
-void
-latexila_synctex_connect_evince_window_async (LatexilaSynctex     *synctex,
-                                              const gchar         *pdf_uri,
-                                              GAsyncReadyCallback  callback,
-                                              gpointer             user_data)
+static void
+connect_evince_window_async (LatexilaSynctex     *synctex,
+                             const gchar         *pdf_uri,
+                             GAsyncReadyCallback  callback,
+                             gpointer             user_data)
 {
   GTask *task;
   ConnectEvinceWindowData *data;
@@ -438,17 +424,9 @@ latexila_synctex_connect_evince_window_async (LatexilaSynctex     *synctex,
                                    task);
 }
 
-/**
- * latexila_synctex_connect_evince_window_finish:
- * @synctex: the #LatexilaSynctex instance.
- * @result: a #GAsyncResult.
- *
- * Finishes the operation started with
- * latexila_synctex_connect_evince_window_async().
- */
-void
-latexila_synctex_connect_evince_window_finish (LatexilaSynctex *synctex,
-                                               GAsyncResult    *result)
+static void
+connect_evince_window_finish (LatexilaSynctex *synctex,
+                              GAsyncResult    *result)
 {
   g_return_if_fail (g_task_is_valid (result, synctex));
 
@@ -460,17 +438,18 @@ latexila_synctex_connect_evince_window_finish (LatexilaSynctex *synctex,
  * @synctex: the #LatexilaSynctex instance.
  * @pdf_uri: the PDF URI.
  *
- * Simple version of latexila_synctex_connect_evince_window_async().
- * This function is also asynchronous, but without callback.
+ * Connects asynchronously the evince window for @pdf_uri. LaTeXila will then
+ * listen the signals emitted by the evince window when the user wants to switch
+ * from the PDF to the corresponding *.tex file.
  */
 void
 latexila_synctex_connect_evince_window (LatexilaSynctex *synctex,
                                         const gchar     *pdf_uri)
 {
-  latexila_synctex_connect_evince_window_async (synctex,
-                                                pdf_uri,
-                                                (GAsyncReadyCallback) 
latexila_synctex_connect_evince_window_finish,
-                                                NULL);
+  connect_evince_window_async (synctex,
+                               pdf_uri,
+                               (GAsyncReadyCallback) connect_evince_window_finish,
+                               NULL);
 }
 
 static void
@@ -500,7 +479,7 @@ connect_evince_window_cb (LatexilaSynctex   *synctex,
   EvinceWindow *evince_window;
   gchar *buffer_path;
 
-  latexila_synctex_connect_evince_window_finish (synctex, result);
+  connect_evince_window_finish (synctex, result);
 
   evince_window = g_hash_table_lookup (synctex->priv->evince_windows, data->pdf_uri);
 
@@ -547,10 +526,10 @@ synctex_file_query_exists_cb (GFile             *synctex_file,
       return;
     }
 
-  latexila_synctex_connect_evince_window_async (instance,
-                                                data->pdf_uri,
-                                                (GAsyncReadyCallback) connect_evince_window_cb,
-                                                data);
+  connect_evince_window_async (instance,
+                               data->pdf_uri,
+                               (GAsyncReadyCallback) connect_evince_window_cb,
+                               data);
 
   g_object_unref (synctex_file);
 }
diff --git a/src/liblatexila/latexila-synctex.h b/src/liblatexila/latexila-synctex.h
index 3b20130..f303aa0 100644
--- a/src/liblatexila/latexila-synctex.h
+++ b/src/liblatexila/latexila-synctex.h
@@ -51,14 +51,6 @@ GType             latexila_synctex_get_type                       (void) G_GNUC_
 
 LatexilaSynctex * latexila_synctex_get_instance                   (void);
 
-void              latexila_synctex_connect_evince_window_async    (LatexilaSynctex     *synctex,
-                                                                   const gchar         *pdf_uri,
-                                                                   GAsyncReadyCallback  callback,
-                                                                   gpointer             user_data);
-
-void              latexila_synctex_connect_evince_window_finish   (LatexilaSynctex *synctex,
-                                                                   GAsyncResult    *result);
-
 void              latexila_synctex_connect_evince_window          (LatexilaSynctex *synctex,
                                                                    const gchar     *pdf_uri);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]