[anjuta] snippets-manager: fix compile warnings



commit a3a4890c28306e5b38f6f6780db074f0d3c23373
Author: Carl-Anton Ingmarsson <ca ingmarsson gmail com>
Date:   Mon Jun 10 09:32:38 2013 +0200

    snippets-manager: fix compile warnings

 plugins/snippets-manager/snippet-variables-store.c |    2 --
 plugins/snippets-manager/snippet.c                 |    4 +---
 plugins/snippets-manager/snippets-browser.c        |   14 +++++---------
 plugins/snippets-manager/snippets-db.c             |    7 -------
 plugins/snippets-manager/snippets-editor.c         |    5 +----
 5 files changed, 7 insertions(+), 25 deletions(-)
---
diff --git a/plugins/snippets-manager/snippet-variables-store.c 
b/plugins/snippets-manager/snippet-variables-store.c
index e86e989..1faf464 100644
--- a/plugins/snippets-manager/snippet-variables-store.c
+++ b/plugins/snippets-manager/snippet-variables-store.c
@@ -351,14 +351,12 @@ get_iter_at_variable (SnippetVarsStore *vars_store,
                       SnippetVariableType type,
                       gboolean in_snippet_only)
 {
-       SnippetVarsStorePrivate *priv = NULL;
        gchar *cur_var_name = NULL;
        gboolean cur_var_in_snippet = FALSE;
        SnippetVariableType cur_type = SNIPPET_VAR_TYPE_ANY;
        
        /* Assertions */
        g_return_val_if_fail (ANJUTA_IS_SNIPPET_VARS_STORE (vars_store), FALSE);
-       priv = ANJUTA_SNIPPET_VARS_STORE_GET_PRIVATE (vars_store);
 
        if (!gtk_tree_model_get_iter_first (GTK_TREE_MODEL (vars_store), iter))
                return FALSE;
diff --git a/plugins/snippets-manager/snippet.c b/plugins/snippets-manager/snippet.c
index 5a7caa1..d6be984 100644
--- a/plugins/snippets-manager/snippet.c
+++ b/plugins/snippets-manager/snippet.c
@@ -1201,12 +1201,10 @@ snippet_is_equal (AnjutaSnippet *snippet,
 {
        const gchar *trigger = NULL, *trigger2 = NULL, *cur_lang = NULL;
        GList *iter = NULL, *languages = NULL;
-       AnjutaSnippetPrivate *priv = NULL;
-       
+
        /* Assertions */
        g_return_val_if_fail (ANJUTA_IS_SNIPPET (snippet), FALSE);
        g_return_val_if_fail (ANJUTA_IS_SNIPPET (snippet), FALSE);
-       priv = ANJUTA_SNIPPET_GET_PRIVATE (snippet);
 
        trigger  = snippet_get_trigger_key (snippet);
        trigger2 = snippet_get_trigger_key (snippet2);
diff --git a/plugins/snippets-manager/snippets-browser.c b/plugins/snippets-manager/snippets-browser.c
index 4b2b89e..ee845b7 100644
--- a/plugins/snippets-manager/snippets-browser.c
+++ b/plugins/snippets-manager/snippets-browser.c
@@ -69,7 +69,7 @@ enum
 };
 
 
-G_DEFINE_TYPE (SnippetsBrowser, snippets_browser, GTK_TYPE_HBOX);
+G_DEFINE_TYPE (SnippetsBrowser, snippets_browser, GTK_TYPE_BOX);
 
 static void
 snippets_browser_class_init (SnippetsBrowserClass* klass)
@@ -206,7 +206,7 @@ init_browser_layout (SnippetsBrowser *snippets_browser)
        gtk_container_add (GTK_CONTAINER (priv->insert_button),
                           gtk_image_new_from_stock (GTK_STOCK_PASTE,
                                                     GTK_ICON_SIZE_MENU));
-       priv->grip = gtk_hbox_new (FALSE, 5);
+       priv->grip = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
        priv->edit_button     = GTK_TOGGLE_BUTTON (gtk_builder_get_object (bxml, "edit_button"));
        priv->snippets_view_cont = GTK_SCROLLED_WINDOW (gtk_builder_get_object (bxml, "snippets_view_cont"));
        priv->snippets_view_vbox = GTK_BOX (gtk_builder_get_object (bxml, "snippets_view_vbox"));
@@ -221,7 +221,7 @@ init_browser_layout (SnippetsBrowser *snippets_browser)
        /* Assert the objects */
        g_return_if_fail (GTK_IS_TOGGLE_BUTTON (priv->edit_button));
        g_return_if_fail (GTK_IS_SCROLLED_WINDOW (priv->snippets_view_cont));
-       g_return_if_fail (GTK_IS_VBOX (priv->snippets_view_vbox));
+       g_return_if_fail (GTK_IS_BOX (priv->snippets_view_vbox));
 
        /* Add the Snippets View to the scrolled window */
        gtk_container_add (GTK_CONTAINER (priv->snippets_view_cont),
@@ -798,12 +798,10 @@ on_add_button_clicked (GtkButton *add_button,
        GtkWidget *menu = NULL, *add_snippet_menu_item = NULL, 
                  *add_snippets_group_menu_item = NULL;
        SnippetsBrowser *snippets_browser = NULL;
-       SnippetsBrowserPrivate *priv = NULL;
-       
+
        /* Assertions */
        g_return_if_fail (ANJUTA_IS_SNIPPETS_BROWSER (user_data));
        snippets_browser = ANJUTA_SNIPPETS_BROWSER (user_data);
-       priv = ANJUTA_SNIPPETS_BROWSER_GET_PRIVATE (snippets_browser);
 
        menu = gtk_menu_new ();
 
@@ -988,15 +986,13 @@ on_snippets_view_query_tooltip (GtkWidget *snippets_view,
                                 GtkTooltip *tooltip,
                                 gpointer user_data)
 {
-       SnippetsBrowser *snippets_browser = NULL;
        SnippetsBrowserPrivate *priv = NULL;
        GtkTreeIter iter;
        GObject *cur_object = NULL;
-               
+
        /* Assertions */
        g_return_val_if_fail (GTK_IS_TREE_VIEW (snippets_view), FALSE);
        g_return_val_if_fail (ANJUTA_IS_SNIPPETS_BROWSER (user_data), FALSE);
-       snippets_browser = ANJUTA_SNIPPETS_BROWSER (user_data);
        priv = ANJUTA_SNIPPETS_BROWSER_GET_PRIVATE (user_data);
        g_return_val_if_fail (ANJUTA_IS_SNIPPETS_DB (priv->snippets_db), FALSE);
        g_return_val_if_fail (GTK_IS_TREE_MODEL (priv->filter), FALSE);
diff --git a/plugins/snippets-manager/snippets-db.c b/plugins/snippets-manager/snippets-db.c
index c5513ab..c89c9ff 100644
--- a/plugins/snippets-manager/snippets-db.c
+++ b/plugins/snippets-manager/snippets-db.c
@@ -1802,14 +1802,12 @@ snippets_db_get_path (GtkTreeModel *tree_model,
 {
        GtkTreePath *path = NULL;
        GtkTreeIter *iter_copy = NULL;
-       SnippetsDB *snippets_db = NULL;
        gint count = 0;
        GList *l_iter = NULL;
 
        /* Assertions */
        g_return_val_if_fail (ANJUTA_IS_SNIPPETS_DB (tree_model), NULL);
        g_return_val_if_fail (iter != NULL, NULL);
-       snippets_db = ANJUTA_SNIPPETS_DB (tree_model);
 
        /* Make a new GtkTreePath object */
        path = gtk_tree_path_new ();
@@ -1848,7 +1846,6 @@ snippets_db_get_value (GtkTreeModel *tree_model,
                        gint column,
                        GValue *value)
 {
-       SnippetsDB *snippets_db = NULL;
        GObject *cur_object = NULL;
        gchar *cur_string = NULL;
 
@@ -1856,7 +1853,6 @@ snippets_db_get_value (GtkTreeModel *tree_model,
        g_return_if_fail (ANJUTA_IS_SNIPPETS_DB (tree_model));
        g_return_if_fail (iter != NULL);
        g_return_if_fail (column >= 0 && column < SNIPPETS_DB_MODEL_COL_N);
-       snippets_db = ANJUTA_SNIPPETS_DB (tree_model);
 
        /* Initializations */
        g_value_init (value, snippets_db_get_column_type (tree_model, column));
@@ -2020,12 +2016,9 @@ snippets_db_iter_parent (GtkTreeModel *tree_model,
                          GtkTreeIter *iter,
                          GtkTreeIter *child)
 {
-       SnippetsDB *snippets_db = NULL;
-
        /* Assertions */
        g_return_val_if_fail (ANJUTA_IS_SNIPPETS_DB (tree_model), FALSE);
        g_return_val_if_fail (child != NULL, FALSE);
-       snippets_db = ANJUTA_SNIPPETS_DB (tree_model);
 
        /* If it's a snippets group node, it doesn't have a parent */
        if (iter_is_snippets_group_node (child))
diff --git a/plugins/snippets-manager/snippets-editor.c b/plugins/snippets-manager/snippets-editor.c
index fa4335c..0bb7da0 100644
--- a/plugins/snippets-manager/snippets-editor.c
+++ b/plugins/snippets-manager/snippets-editor.c
@@ -173,7 +173,7 @@ static void  on_name_entry_text_changed          (GObject *entry_obj,
                                                   GParamSpec *param_spec,
                                                   gpointer user_data);
 
-G_DEFINE_TYPE (SnippetsEditor, snippets_editor, GTK_TYPE_HBOX);
+G_DEFINE_TYPE (SnippetsEditor, snippets_editor, GTK_TYPE_BOX);
 
 
 static void
@@ -1758,11 +1758,8 @@ on_variables_view_row_activated (GtkTreeView *tree_view,
                                  GtkTreeViewColumn *col,
                                  gpointer user_data)
 {
-       SnippetsEditorPrivate *priv = NULL;
-       
        /* Assertions */
        g_return_if_fail (ANJUTA_IS_SNIPPETS_EDITOR (user_data));
-       priv = ANJUTA_SNIPPETS_EDITOR_GET_PRIVATE (user_data);
 
        /* TODO -- still to be decided :) */
        


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