[gnome-latex: 173/205] Some default preferences changed (sizes)



commit 9fedc06a44093b1a4f2cf565fbc9f8191b722c0a
Author: Sébastien Wilmet <sebastien wilmet gmail com>
Date:   Wed Jan 20 18:29:54 2010 +0100

    Some default preferences changed (sizes)
    
    And cleaning of the code.

 src/callbacks.c           |  6 +++---
 src/file_browser.c        |  4 ++--
 src/latex_output_filter.c |  2 +-
 src/prefs.c               | 26 +++++++++++++-------------
 src/symbols.c             |  4 ++--
 src/templates.c           |  2 +-
 6 files changed, 22 insertions(+), 22 deletions(-)
---
diff --git a/src/callbacks.c b/src/callbacks.c
index c8e459a..76ce55c 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -919,7 +919,7 @@ cb_documents_save_all (void)
        GList *current = latexila.all_docs;
        while (current != NULL)
        {
-               document_t *current_doc = g_list_nth_data (current, 0);
+               document_t *current_doc = current->data;
                document_t *active_doc = latexila.active_doc;
                latexila.active_doc = current_doc;
                cb_save ();
@@ -1138,7 +1138,7 @@ open_new_document (const gchar *filename, const gchar *uri)
        gint n = 0;
        while (current != NULL)
        {
-               document_t *current_doc = g_list_nth_data (current, 0);
+               document_t *current_doc = current->data;
 
                // if the filename is the same, just go to that tab on the notebook
                if (current_doc->path != NULL &&
@@ -1196,7 +1196,7 @@ change_font_source_view (void)
        GList *current = latexila.all_docs;
        while (current != NULL)
        {
-               document_t *doc = g_list_nth_data (current, 0);
+               document_t *doc = current->data;
                gtk_widget_modify_font (doc->source_view, latexila.prefs.font_desc);
                current = g_list_next (current);
        }
diff --git a/src/file_browser.c b/src/file_browser.c
index 6154095..90519c1 100644
--- a/src/file_browser.c
+++ b/src/file_browser.c
@@ -210,7 +210,7 @@ fill_list_store_with_current_dir (void)
        GList *current = directory_list;
        while (current != NULL)
        {
-               gchar *directory = g_list_nth_data (current, 0);
+               gchar *directory = current->data;
 
                // append the directory to the list store
                gtk_list_store_append (latexila.file_browser.list_store, &iter);
@@ -227,7 +227,7 @@ fill_list_store_with_current_dir (void)
        current = file_list;
        while (current != NULL)
        {
-               gchar *file = g_list_nth_data (current, 0);
+               gchar *file = current->data;
 
                GdkPixbuf *pixbuf;
                if (g_str_has_suffix (file, ".tex"))
diff --git a/src/latex_output_filter.c b/src/latex_output_filter.c
index e49344c..26eaf79 100644
--- a/src/latex_output_filter.c
+++ b/src/latex_output_filter.c
@@ -762,7 +762,7 @@ get_current_filename (void)
 {
        if (g_slist_length (stack_file) > 0)
        {
-               file_in_stack_t *file = g_slist_nth_data (stack_file, 0);
+               file_in_stack_t *file = stack_file->data;
                return file->filename;
        }
 
diff --git a/src/prefs.c b/src/prefs.c
index ea946e9..9def880 100644
--- a/src/prefs.c
+++ b/src/prefs.c
@@ -76,14 +76,14 @@ static void fill_style_schemes_list_store (GtkListStore *store,
 static gboolean        show_line_numbers_                              = FALSE;
 static gboolean        show_side_pane_                                 = TRUE;
 static gboolean show_edit_toolbar_                             = TRUE;
-static gint            window_width_                                   = 800;
-static gint            window_height_                                  = 600;
+static gint            window_width_                                   = 950;
+static gint            window_height_                                  = 660;
 static gboolean        window_maximised_                               = FALSE;
-static gint            main_hpaned_pos_                                = 180;
-static gint            vpaned_pos_                                             = 380;
-static gint            log_hpaned_pos_                                 = 190;
+static gint            main_hpaned_pos_                                = 256;
+static gint            vpaned_pos_                                             = 375;
+static gint            log_hpaned_pos_                                 = 180;
 static gchar   *font_                                                  = "Monospace 10";
-static gchar   *command_view_                                  = "evince";
+static gchar   *command_view_                                  = "gnome-open";
 static gchar   *command_latex_                                 = COMMAND_LATEX;
 static gchar   *command_pdflatex_                              = COMMAND_PDFLATEX;
 static gchar   *command_dvipdf_                                = COMMAND_DVIPDF;
@@ -700,7 +700,7 @@ cb_pref_line_numbers (GtkToggleButton *toggle_button, gpointer user_data)
        GList *current = latexila.all_docs;
        while (current != NULL)
        {
-               document_t *doc = g_list_nth_data (current, 0);
+               document_t *doc = current->data;
                gtk_source_view_set_show_line_numbers (
                                GTK_SOURCE_VIEW (doc->source_view), show_line_numbers);
                current = g_list_next (current);
@@ -717,7 +717,7 @@ cb_pref_tab_width (GtkSpinButton *spin_button, gpointer user_data)
        GList *current = latexila.all_docs;
        while (current != NULL)
        {
-               document_t *doc = g_list_nth_data (current, 0);
+               document_t *doc = current->data;
                gtk_source_view_set_tab_width (GTK_SOURCE_VIEW (doc->source_view), value);
                current = g_list_next (current);
        }
@@ -734,7 +734,7 @@ cb_pref_spaces_instead_of_tabs (GtkToggleButton *toggle_button,
        GList *current = latexila.all_docs;
        while (current != NULL)
        {
-               document_t *doc = g_list_nth_data (current, 0);
+               document_t *doc = current->data;
                gtk_source_view_set_insert_spaces_instead_of_tabs (
                                GTK_SOURCE_VIEW (doc->source_view), tmp);
                current = g_list_next (current);
@@ -752,7 +752,7 @@ cb_pref_highlight_current_line (GtkToggleButton *toggle_button,
        GList *current = latexila.all_docs;
        while (current != NULL)
        {
-               document_t *doc = g_list_nth_data (current, 0);
+               document_t *doc = current->data;
                gtk_source_view_set_highlight_current_line (
                                GTK_SOURCE_VIEW (doc->source_view), tmp);
                current = g_list_next (current);
@@ -770,7 +770,7 @@ cb_pref_highlight_matching_brackets (GtkToggleButton *toggle_button,
        GList *current = latexila.all_docs;
        while (current != NULL)
        {
-               document_t *doc = g_list_nth_data (current, 0);
+               document_t *doc = current->data;
                gtk_source_buffer_set_highlight_matching_brackets (doc->source_buffer, tmp);
                current = g_list_next (current);
        }
@@ -895,7 +895,7 @@ cb_style_scheme_changed (GtkTreeSelection *selection, gpointer user_data)
                for (GList *current = latexila.all_docs ; current != NULL ;
                                current = g_list_next (current))
                {
-                       document_t *doc = g_list_nth_data (current, 0);
+                       document_t *doc = current->data;
                        gtk_source_buffer_set_style_scheme (doc->source_buffer, style_scheme);
                }
        }
@@ -975,7 +975,7 @@ fill_style_schemes_list_store (GtkListStore *store, GtkTreeSelection *selection)
 
        while (list != NULL)
        {
-               GtkSourceStyleScheme *style_scheme = g_slist_nth_data (list, 0);
+               GtkSourceStyleScheme *style_scheme = list->data;
 
                const gchar *id = gtk_source_style_scheme_get_id (style_scheme);
                gchar *desc = g_strdup_printf ("%s (%s)",
diff --git a/src/symbols.c b/src/symbols.c
index 21370dd..f17c8f0 100644
--- a/src/symbols.c
+++ b/src/symbols.c
@@ -881,7 +881,7 @@ static void
 cb_category_symbols_selected (GtkIconView *icon_view, gpointer user_data)
 {
        GList *selected_items = gtk_icon_view_get_selected_items (icon_view);
-       GtkTreePath *path = g_list_nth_data (selected_items, 0);
+       GtkTreePath *path = selected_items->data;
        GtkTreeModel *model = gtk_icon_view_get_model (icon_view);
        GtkTreeIter iter;
 
@@ -923,7 +923,7 @@ cb_symbol_selected (GtkIconView *icon_view, gpointer user_data)
        GList *selected_items = gtk_icon_view_get_selected_items (icon_view);
        // unselect the symbol, so the user can insert several times the same symbol
        gtk_icon_view_unselect_all (icon_view);
-       GtkTreePath *path = g_list_nth_data (selected_items, 0);
+       GtkTreePath *path = selected_items->data;
        GtkTreeModel *model = gtk_icon_view_get_model (icon_view);
        GtkTreeIter iter;
 
diff --git a/src/templates.c b/src/templates.c
index 68df9ba..5ff5bc3 100644
--- a/src/templates.c
+++ b/src/templates.c
@@ -123,7 +123,7 @@ cb_new (void)
                        model = GTK_TREE_MODEL (personnal_store);
                }
 
-               GtkTreePath *path = g_list_nth_data (selected_items, 0);
+               GtkTreePath *path = selected_items->data;
                GtkTreeIter iter;
                gchar *contents = NULL;
 


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