[anjuta] debug-manager: fix compile warnings



commit 9311fc4a09e0bb86a86a227ecc878300e35bae32
Author: Carl-Anton Ingmarsson <ca ingmarsson gmail com>
Date:   Wed May 15 18:34:42 2013 +0200

    debug-manager: fix compile warnings
    
    Remove some unused variables and set check_debug_dialog and
    remote_dialog as transient for the top anjuta window.

 plugins/debug-manager/plugin.c      |   13 -------------
 plugins/debug-manager/queue.c       |    6 ++----
 plugins/debug-manager/stack_trace.c |    2 --
 plugins/debug-manager/start.c       |   10 ++++++----
 4 files changed, 8 insertions(+), 23 deletions(-)
---
diff --git a/plugins/debug-manager/plugin.c b/plugins/debug-manager/plugin.c
index 5224347..5ebf400 100644
--- a/plugins/debug-manager/plugin.c
+++ b/plugins/debug-manager/plugin.c
@@ -388,14 +388,11 @@ on_session_save (AnjutaShell *shell, AnjutaSessionPhase phase,
 static void
 dma_plugin_debugger_started (DebugManagerPlugin *this)
 {
-       AnjutaUI *ui;
        GtkAction *action;
        AnjutaStatus* status;
 
        DEBUG_PRINT ("%s", "DMA: dma_plugin_debugger_started");
 
-       ui = anjuta_shell_get_ui (ANJUTA_PLUGIN (this)->shell, NULL);
-
        /* Update ui */
        action = gtk_action_group_get_action (this->start_group, "ActionDebuggerStop");
        gtk_action_set_sensitive (action, TRUE);
@@ -415,13 +412,11 @@ dma_plugin_debugger_started (DebugManagerPlugin *this)
 static void
 dma_plugin_program_loaded (DebugManagerPlugin *this)
 {
-       AnjutaUI *ui;
        AnjutaStatus* status;
 
        DEBUG_PRINT ("%s", "DMA: dma_plugin_program_loaded");
 
        /* Update ui */
-       ui = anjuta_shell_get_ui (ANJUTA_PLUGIN (this)->shell, NULL);
        gtk_action_group_set_sensitive (this->loaded_group, TRUE);
        gtk_action_group_set_sensitive (this->stopped_group, FALSE);
        gtk_action_group_set_sensitive (this->running_group, FALSE);
@@ -437,13 +432,11 @@ dma_plugin_program_loaded (DebugManagerPlugin *this)
 static void
 dma_plugin_program_running (DebugManagerPlugin *this)
 {
-       AnjutaUI *ui;
        AnjutaStatus* status;
 
        DEBUG_PRINT ("%s", "DMA: dma_plugin_program_running");
 
        /* Update ui */
-       ui = anjuta_shell_get_ui (ANJUTA_PLUGIN (this)->shell, NULL);
        gtk_action_group_set_sensitive (this->loaded_group, TRUE);
        gtk_action_group_set_sensitive (this->stopped_group, FALSE);
        gtk_action_group_set_sensitive (this->running_group, TRUE);
@@ -464,13 +457,11 @@ dma_plugin_program_running (DebugManagerPlugin *this)
 static void
 dma_plugin_program_stopped (DebugManagerPlugin *this)
 {
-       AnjutaUI *ui;
        AnjutaStatus* status;
 
        DEBUG_PRINT ("%s", "DMA: dma_plugin_program_broken");
 
        /* Update ui */
-       ui = anjuta_shell_get_ui (ANJUTA_PLUGIN (this)->shell, NULL);
        gtk_action_group_set_sensitive (this->loaded_group, TRUE);
        gtk_action_group_set_sensitive (this->stopped_group, TRUE);
        gtk_action_group_set_sensitive (this->running_group, FALSE);
@@ -498,13 +489,11 @@ dma_plugin_program_moved (DebugManagerPlugin *this, guint pid, guint tid, gulong
 static void
 dma_plugin_program_unload (DebugManagerPlugin *this)
 {
-       AnjutaUI *ui;
        AnjutaStatus* status;
 
        DEBUG_PRINT ("%s", "DMA: dma_plugin_program_unload");
 
        /* Update ui */
-       ui = anjuta_shell_get_ui (ANJUTA_PLUGIN (this)->shell, NULL);
        gtk_action_group_set_visible (this->start_group, TRUE);
        gtk_action_group_set_sensitive (this->start_group, TRUE);
        gtk_action_group_set_visible (this->loaded_group, TRUE);
@@ -523,7 +512,6 @@ dma_plugin_program_unload (DebugManagerPlugin *this)
 static void
 dma_plugin_debugger_stopped (DebugManagerPlugin *self, GError *err)
 {
-       AnjutaUI *ui;
        GtkAction *action;
        AnjutaStatus* state;
 
@@ -532,7 +520,6 @@ dma_plugin_debugger_stopped (DebugManagerPlugin *self, GError *err)
        dma_plugin_program_unload (self);
 
        /* Update ui */
-       ui = anjuta_shell_get_ui (ANJUTA_PLUGIN (self)->shell, NULL);
        gtk_action_group_set_visible (self->start_group, TRUE);
        gtk_action_group_set_sensitive (self->start_group, TRUE);
        action = gtk_action_group_get_action (self->start_group, "ActionDebuggerStop");
diff --git a/plugins/debug-manager/queue.c b/plugins/debug-manager/queue.c
index 8097ca4..1273994 100644
--- a/plugins/debug-manager/queue.c
+++ b/plugins/debug-manager/queue.c
@@ -326,11 +326,9 @@ dma_queue_emit_debugger_ready (DmaDebuggerQueue *self)
 
        if (busy != self->busy)
        {
-               AnjutaStatus* status;
-               
-               status = anjuta_shell_get_status(ANJUTA_PLUGIN (self->plugin)->shell, NULL);
+               /* FIXME: set AnjutaStatus to busy? */
                self->busy = busy;
-       }       
+       }
 }
 
 static void dma_debugger_queue_execute (DmaDebuggerQueue *self);
diff --git a/plugins/debug-manager/stack_trace.c b/plugins/debug-manager/stack_trace.c
index 0376485..ffdd172 100644
--- a/plugins/debug-manager/stack_trace.c
+++ b/plugins/debug-manager/stack_trace.c
@@ -266,7 +266,6 @@ on_stack_trace_updated (const GList *stack, gpointer user_data, GError *error)
        StackPacket *packet = (StackPacket *)user_data;
        StackTrace *self;
        guint thread;
-       gboolean scroll;
        GtkTreeModel *model;
        GtkTreeIter iter;
        GtkTreeIter parent;
@@ -278,7 +277,6 @@ on_stack_trace_updated (const GList *stack, gpointer user_data, GError *error)
 
        self = packet->self;
        thread = packet->thread;
-       scroll = packet->scroll;
        if (packet->unblock) g_signal_handler_unblock (self->plugin, self->changed_handler);
        g_slice_free (StackPacket, packet);
 
diff --git a/plugins/debug-manager/start.c b/plugins/debug-manager/start.c
index eb124a1..a6d534a 100644
--- a/plugins/debug-manager/start.c
+++ b/plugins/debug-manager/start.c
@@ -297,7 +297,7 @@ static void on_session_load (AnjutaShell *shell, AnjutaSessionPhase phase, Anjut
  *---------------------------------------------------------------------------*/
 
 static AttachProcess *
-attach_process_new ()
+attach_process_new (void)
 {
        AttachProcess *ap;
        ap = g_new0 (AttachProcess, 1);
@@ -861,7 +861,8 @@ show_check_debug_dialog (DmaStart *this)
                DO_NOT_SHOW_CHECK, &do_not_show,
                    NULL);
                g_object_unref (bxml);
-       
+
+               gtk_window_set_transient_for (GTK_WINDOW (dialog), parent);
                res = gtk_dialog_run (GTK_DIALOG (dialog));
        
                if (gtk_toggle_button_get_active        (do_not_show))
@@ -1123,8 +1124,6 @@ show_remote_dialog (DmaStart *this)
        GtkWidget *serial_container;
        gint res;
 
-       parent = GTK_WINDOW (this->plugin->shell);
-
        /* Fetch out the widget we care about for now */
        bxml = anjuta_util_builder_new (GLADE_FILE, NULL);
        if (!bxml) return FALSE;
@@ -1140,6 +1139,9 @@ show_remote_dialog (DmaStart *this)
            NULL);
        g_object_unref (bxml);
 
+       parent = GTK_WINDOW (this->plugin->shell);
+       gtk_window_set_transient_for (GTK_WINDOW (dialog), parent);
+
        /* Connect signals */   
        g_signal_connect (G_OBJECT (tcpip_radio), "toggled", G_CALLBACK (on_radio_toggled), tcpip_container);
        g_signal_connect (G_OBJECT (serial_radio), "toggled", G_CALLBACK (on_radio_toggled), 
serial_container); 


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