Skip to content
Permalink
Browse files

remove unnecessary function arguments

  • Loading branch information...
alexandervdm committed Nov 8, 2019
1 parent 8b7e5aa commit db97ee885031f6ffc24375617e5f7236dc043bed
Showing with 18 additions and 18 deletions.
  1. +7 −6 src/biblio.c
  2. +3 −3 src/biblio.h
  3. +3 −4 src/gui/gui-main.c
  4. +2 −2 src/latex.c
  5. +2 −2 src/latex.h
  6. +1 −1 src/motion.c
@@ -33,9 +33,10 @@

#include "biblio.h"
#include "constants.h"
#include "utils.h"
#include "latex.h"
#include "environment.h"
#include "latex.h"
#include "utils.h"


extern GuEditor* ec;

@@ -61,7 +62,7 @@ GuBiblio* biblio_init (GtkBuilder* builder) {
return b;
}

gboolean biblio_detect_bibliography (GuBiblio* bc, GuEditor* ec) {
gboolean biblio_detect_bibliography (GuEditor* ec) {
gchar* content = NULL;
gchar* bibfn = NULL;
gchar** result = NULL;
@@ -91,7 +92,7 @@ gboolean biblio_detect_bibliography (GuBiblio* bc, GuEditor* ec) {
return state;
}

gboolean biblio_compile_bibliography (GuBiblio* bc, GuEditor* ec, GuLatex* lc) {
gboolean biblio_compile_bibliography (GuBiblio* bc, GuEditor* ec) {
gchar* dirname = g_path_get_dirname (ec->workfile);
gchar* auxname = NULL;

@@ -107,8 +108,8 @@ gboolean biblio_compile_bibliography (GuBiblio* bc, GuEditor* ec, GuLatex* lc) {
C_TEXSEC, auxname);

g_free (auxname);
latex_update_workfile (lc, ec);
latex_update_auxfile (lc, ec);
latex_update_workfile (ec);
latex_update_auxfile (ec);
Tuple2 res = utils_popen_r (command, dirname);
gtk_widget_set_tooltip_text (GTK_WIDGET (bc->progressbar),
(gchar*)res.second);
@@ -32,7 +32,7 @@

#include <gtk/gtk.h>

#include "latex.h"
#include "editor.h"

#define GU_BIBLIO(x) ((GuBiblio*)x)
typedef struct _GuBiblio GuBiblio;
@@ -49,8 +49,8 @@ struct _GuBiblio {
};

GuBiblio* biblio_init (GtkBuilder* builder);
gboolean biblio_detect_bibliography (GuBiblio* bc, GuEditor* ec);
gboolean biblio_compile_bibliography (GuBiblio* bc, GuEditor* ec, GuLatex* lc);
gboolean biblio_detect_bibliography (GuEditor* ec);
gboolean biblio_compile_bibliography (GuBiblio* bc, GuEditor* ec);
int biblio_parse_entries (GuBiblio* bc, gchar *bib_content);


@@ -470,7 +470,7 @@ void gui_set_hastabs_sensitive (gboolean enable) {

G_MODULE_EXPORT
void on_menu_bibupdate_activate (GtkWidget *widget, void * user) {
biblio_compile_bibliography (gummi->biblio, g_active_editor, gummi->latex);
biblio_compile_bibliography (gummi->biblio, g_active_editor);
}

G_MODULE_EXPORT
@@ -606,8 +606,7 @@ void on_button_biblio_compile_clicked (GtkWidget* widget, void* user) {
gtk_widget_set_sensitive (widget, FALSE);
g_timeout_add (10, on_bibprogressbar_update, widget);

if (biblio_compile_bibliography (gummi->biblio, g_active_editor,
gummi->latex)) {
if (biblio_compile_bibliography (gummi->biblio, g_active_editor)) {
statusbar_set_message (_("Compiling bibliography file.."));
// NOTE gtk3s bar doesn't place text inside the widget anymore :/
//gtk_progress_bar_set_text (gummi->biblio->progressbar,
@@ -634,7 +633,7 @@ void on_button_biblio_detect_clicked (GtkWidget* widget, void* user) {
g_timeout_add (2, on_bibprogressbar_update, widget);
gtk_list_store_clear (gummi->biblio->list_biblios);

if (biblio_detect_bibliography (gummi->biblio, g_active_editor)) {
if (biblio_detect_bibliography (g_active_editor)) {
editor_insert_bib (g_active_editor, g_active_editor->bibfile);
if (!g_file_get_contents(g_active_editor->bibfile, &text, NULL, &err)) {
slog (L_G_ERROR, "g_file_get_contents (): %s\n", err->message);
@@ -69,7 +69,7 @@ gboolean latex_method_active (gchar* method) {
return config_value_as_str_equals ("Compile", "steps", method);
}

gchar* latex_update_workfile (GuLatex* lc, GuEditor* ec) {
gchar* latex_update_workfile (GuEditor* ec) {
gchar *text;

text = editor_grab_buffer (ec);
@@ -193,7 +193,7 @@ gboolean latex_update_pdffile (GuLatex* lc, GuEditor* ec) {
return cerrors == 0;
}

void latex_update_auxfile (GuLatex* lc, GuEditor* ec) {
void latex_update_auxfile (GuEditor* ec) {
gchar* dirname = g_path_get_dirname (ec->workfile);
gchar* command = g_strdup_printf ("%s %s "
"--draftmode "
@@ -51,9 +51,9 @@ struct _GuLatex {

GuLatex* latex_init (void);
gboolean latex_precompile_check (gchar* editortext);
gchar* latex_update_workfile (GuLatex* lc, GuEditor* ec);
gchar* latex_update_workfile (GuEditor* ec);
gboolean latex_update_pdffile (GuLatex* lc, GuEditor* ec);
void latex_update_auxfile (GuLatex* lc, GuEditor* ec);
void latex_update_auxfile (GuEditor* ec);
void latex_export_pdffile (GuLatex* lc, GuEditor* ec, const gchar* path,
gboolean prompt_overrite);

@@ -181,7 +181,7 @@ gpointer motion_compile_thread (gpointer data) {
}

gdk_threads_enter ();
editortext = latex_update_workfile (latex, editor);
editortext = latex_update_workfile (editor);
precompile_ok = latex_precompile_check (editortext);
g_free (editortext);
gdk_threads_leave ();

0 comments on commit db97ee8

Please sign in to comment.
You can’t perform that action at this time.