[anjuta] git: Fix compile warnings.
- From: James Liggett <jrliggett src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] git: Fix compile warnings.
- Date: Sat, 1 Dec 2012 22:33:48 +0000 (UTC)
commit 8060453eb6212098c4655ce8d75d8d9b1df0489a
Author: Carl-Anton Ingmarsson <ca ingmarsson gmail com>
Date: Fri Nov 30 00:04:28 2012 +0100
git: Fix compile warnings.
Mostly regarding unused variables but also a missing sentinel to
gtk_dialog_new_with_buttons() and use of the deprecated gtk_hbox_new().
https://bugzilla.gnome.org/show_bug.cgi?id=689315
plugins/git/git-bisect-reset-command.c | 4 ----
plugins/git/git-create-tag-pane.c | 3 ---
plugins/git/git-init-command.c | 10 +---------
plugins/git/git-pane.c | 4 ++--
plugins/git/git-push-pane.c | 3 ---
plugins/git/git-reset-pane.c | 5 +----
plugins/git/git-stash-clear-command.c | 10 +---------
plugins/git/git-stash-list-command.c | 4 ----
plugins/git/git-status-pane.c | 5 -----
plugins/git/plugin.c | 2 --
10 files changed, 5 insertions(+), 45 deletions(-)
---
diff --git a/plugins/git/git-bisect-reset-command.c b/plugins/git/git-bisect-reset-command.c
index 715af75..ab5f0be 100644
--- a/plugins/git/git-bisect-reset-command.c
+++ b/plugins/git/git-bisect-reset-command.c
@@ -42,10 +42,6 @@ git_bisect_reset_command_finalize (GObject *object)
static guint
git_bisect_reset_command_run (AnjutaCommand *command)
{
- GitBisectResetCommand *self;
-
- self = GIT_BISECT_RESET_COMMAND (command);
-
git_command_add_arg (GIT_COMMAND (command), "bisect");
git_command_add_arg (GIT_COMMAND (command), "reset");
diff --git a/plugins/git/git-create-tag-pane.c b/plugins/git/git-create-tag-pane.c
index 204f235..4ecc520 100644
--- a/plugins/git/git-create-tag-pane.c
+++ b/plugins/git/git-create-tag-pane.c
@@ -125,7 +125,6 @@ git_create_tag_pane_init (GitCreateTagPane *self)
GError *error = NULL;
GtkWidget *ok_button;
GtkWidget *cancel_button;
- GtkWidget *revision_entry;
GtkWidget *annotate_check;
GtkWidget *log_view;
@@ -145,8 +144,6 @@ git_create_tag_pane_init (GitCreateTagPane *self)
"ok_button"));
cancel_button = GTK_WIDGET (gtk_builder_get_object (self->priv->builder,
"cancel_button"));
- revision_entry = GTK_WIDGET (gtk_builder_get_object (self->priv->builder,
- "revision_entry"));
annotate_check = GTK_WIDGET (gtk_builder_get_object (self->priv->builder,
"annotate_check"));
log_view = GTK_WIDGET (gtk_builder_get_object (self->priv->builder,
diff --git a/plugins/git/git-init-command.c b/plugins/git/git-init-command.c
index 8af3398..65228e6 100644
--- a/plugins/git/git-init-command.c
+++ b/plugins/git/git-init-command.c
@@ -36,20 +36,12 @@ git_init_command_init (GitInitCommand *self)
static void
git_init_command_finalize (GObject *object)
{
- GitInitCommand *self;
-
- self = GIT_INIT_COMMAND (object);
-
G_OBJECT_CLASS (git_init_command_parent_class)->finalize (object);
}
static guint
git_init_command_run (AnjutaCommand *command)
-{
- GitInitCommand *self;
-
- self = GIT_INIT_COMMAND (command);
-
+{
git_command_add_arg (GIT_COMMAND (command), "init");
return 0;
diff --git a/plugins/git/git-pane.c b/plugins/git/git-pane.c
index e45b917..4601350 100644
--- a/plugins/git/git-pane.c
+++ b/plugins/git/git-pane.c
@@ -217,12 +217,12 @@ message_dialog (GtkMessageType message_type, const gchar *message, Git *plugin)
dialog = gtk_dialog_new_with_buttons (dialog_title,
GTK_WINDOW (ANJUTA_PLUGIN (plugin)->shell),
GTK_DIALOG_DESTROY_WITH_PARENT,
- NULL);
+ NULL, NULL);
close_button = gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CLOSE,
GTK_RESPONSE_CLOSE);
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
- hbox = gtk_hbox_new (FALSE, 2);
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
text_view = gtk_text_view_new ();
text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text_view));
diff --git a/plugins/git/git-push-pane.c b/plugins/git/git-push-pane.c
index 4d69ae0..48bf607 100644
--- a/plugins/git/git-push-pane.c
+++ b/plugins/git/git-push-pane.c
@@ -380,15 +380,12 @@ AnjutaDockPane *
git_push_pane_new (Git *plugin)
{
GitPushPane *self;
- GtkLabel *selected_remote_label;
GtkListStore *push_branch_model;
GtkListStore *push_tag_model;
GitBranchListCommand *branch_list_command;
GitTagListCommand *tag_list_command;
self = g_object_new (GIT_TYPE_PUSH_PANE, "plugin", plugin, NULL);
- selected_remote_label = GTK_LABEL (gtk_builder_get_object (self->priv->builder,
- "selected_remote_label"));
push_branch_model = GTK_LIST_STORE (gtk_builder_get_object (self->priv->builder,
"push_branch_model"));
push_tag_model = GTK_LIST_STORE (gtk_builder_get_object (self->priv->builder,
diff --git a/plugins/git/git-reset-pane.c b/plugins/git/git-reset-pane.c
index df861f4..710c0ba 100644
--- a/plugins/git/git-reset-pane.c
+++ b/plugins/git/git-reset-pane.c
@@ -33,7 +33,6 @@ on_ok_button_clicked (GtkButton *button, GitResetPane *self)
AnjutaEntry *revision_entry;
GtkToggleButton *mixed_radio;
GtkToggleButton *soft_radio;
- GtkToggleButton *hard_radio;
const gchar *revision;
GitResetTreeMode mode;
GitResetTreeCommand *reset_command;
@@ -45,9 +44,7 @@ on_ok_button_clicked (GtkButton *button, GitResetPane *self)
"mixed_radio"));
soft_radio = GTK_TOGGLE_BUTTON (gtk_builder_get_object (self->priv->builder,
"soft_radio"));
- hard_radio = GTK_TOGGLE_BUTTON (gtk_builder_get_object (self->priv->builder,
- "hard_radio"));
-
+
revision = anjuta_entry_get_text (revision_entry);
if (g_utf8_strlen (revision, -1) == 0)
diff --git a/plugins/git/git-stash-clear-command.c b/plugins/git/git-stash-clear-command.c
index bcef2c9..1e8170c 100644
--- a/plugins/git/git-stash-clear-command.c
+++ b/plugins/git/git-stash-clear-command.c
@@ -36,20 +36,12 @@ git_stash_clear_command_init (GitStashClearCommand *self)
static void
git_stash_clear_command_finalize (GObject *object)
{
- GitStashClearCommand *self;
-
- self = GIT_STASH_CLEAR_COMMAND (object);
-
G_OBJECT_CLASS (git_stash_clear_command_parent_class)->finalize (object);
}
static guint
git_stash_clear_command_run (AnjutaCommand *command)
-{
- GitStashClearCommand *self;
-
- self = GIT_STASH_CLEAR_COMMAND (command);
-
+{
git_command_add_arg (GIT_COMMAND (command), "stash");
git_command_add_arg (GIT_COMMAND (command), "clear");
diff --git a/plugins/git/git-stash-list-command.c b/plugins/git/git-stash-list-command.c
index f5ec026..ea21a76 100644
--- a/plugins/git/git-stash-list-command.c
+++ b/plugins/git/git-stash-list-command.c
@@ -72,10 +72,6 @@ git_stash_list_command_finalize (GObject *object)
static guint
git_stash_list_command_run (AnjutaCommand *command)
{
- GitStashListCommand *self;
-
- self = GIT_STASH_LIST_COMMAND (command);
-
git_command_add_arg (GIT_COMMAND (command), "stash");
git_command_add_arg (GIT_COMMAND (command), "list");
return 0;
diff --git a/plugins/git/git-status-pane.c b/plugins/git/git-status-pane.c
index 77cda8d..02fb5da 100644
--- a/plugins/git/git-status-pane.c
+++ b/plugins/git/git-status-pane.c
@@ -353,12 +353,9 @@ static void
git_status_pane_clear (GitStatusPane *self)
{
GtkTreeStore *status_model;
- GtkTreeView *status_view;
status_model = GTK_TREE_STORE (gtk_builder_get_object (self->priv->builder,
"status_model"));
- status_view = GTK_TREE_VIEW (gtk_builder_get_object (self->priv->builder,
- "status_view"));
/* Clear any existing model data and create the placeholders */
gtk_tree_store_clear (status_model);
@@ -551,10 +548,8 @@ git_status_pane_finalize (GObject *object)
static void
git_status_pane_refresh (AnjutaDockPane *pane)
{
- GitStatusPane *self;
Git *plugin;
- self = GIT_STATUS_PANE (pane);
plugin = ANJUTA_PLUGIN_GIT (anjuta_dock_pane_get_plugin (pane));
anjuta_command_start (ANJUTA_COMMAND (plugin->commit_status_command));
diff --git a/plugins/git/plugin.c b/plugins/git/plugin.c
index d6d151f..6279274 100644
--- a/plugins/git/plugin.c
+++ b/plugins/git/plugin.c
@@ -846,10 +846,8 @@ static gboolean
git_deactivate_plugin (AnjutaPlugin *plugin)
{
Git *git_plugin;
- AnjutaStatus *status;
git_plugin = ANJUTA_PLUGIN_GIT (plugin);
- status = anjuta_shell_get_status (plugin->shell, NULL);
DEBUG_PRINT ("%s", "Git: Dectivating Git plugin.\n");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]