Commit 2c932177 authored by Naba Kumar's avatar Naba Kumar

src/registers.c src/registers.h src/registers_cbs.c src/registers_cbs.h

	* src/registers.c
	  src/registers.h
	  src/registers_cbs.c
	  src/registers_cbs.h
	  src/registers_gui.c
	  src/sharedlib.c
	  src/sharedlib.h
	  src/sharedlib_cbs.c
	  src/sharedlib_cbs.h
	  src/sharedlib_gui.c
	  src/signals.c
	  src/signals.h
	  src/signals_cbs.c
	  src/signals_cbs.h
	  src/signals_gui.c
	  src/stack_trace.c
	  src/stack_trace.h
	  src/stack_trace_cbs.c
	  src/stack_trace_cbs.h
	  src/stack_trace_gui.c
	  src/text_editor.c
	  src/watch.c
	  src/watch.h
	  src/watch_cbs.c
	  src/watch_cbs.h
	  src/watch_gui.c

	  Fixed bug #496290: Attach/detach removed from these
	  windows as they are never implemented.

	  Patch submitted by:
	  Johannes Schmid <johannes.schmid@gmx.de>
parent 27f97bb4
2002-01-21 Naba Kumar <kh_naba@users.sourceforge.net>
* src/registers.c
src/registers.h
src/registers_cbs.c
src/registers_cbs.h
src/registers_gui.c
src/sharedlib.c
src/sharedlib.h
src/sharedlib_cbs.c
src/sharedlib_cbs.h
src/sharedlib_gui.c
src/signals.c
src/signals.h
src/signals_cbs.c
src/signals_cbs.h
src/signals_gui.c
src/stack_trace.c
src/stack_trace.h
src/stack_trace_cbs.c
src/stack_trace_cbs.h
src/stack_trace_gui.c
src/text_editor.c
src/watch.c
src/watch.h
src/watch_cbs.c
src/watch_cbs.h
src/watch_gui.c
Fixed bug #496290: Attach/detach removed from these
windows as they are never implemented.
Patch submitted by:
Johannes Schmid <johannes.schmid@gmx.de>
2002-01-18 Naba Kumar <kh_naba@users.sourceforge.net>
* src/anjuta.c,
......
......@@ -39,7 +39,6 @@ CpuRegisters* cpu_registers_new()
create_cpu_registers_gui(ew);
ew->current_index = 0;
ew->is_showing = FALSE;
ew->is_docked = FALSE;
ew->win_pos_x = 250;
ew->win_pos_y = 100;
ew->win_width = 200;
......@@ -89,20 +88,11 @@ cpu_registers_show(CpuRegisters* ew)
{
if(ew->is_showing)
{
if(ew->is_docked == FALSE)
gdk_window_raise(ew->widgets.window->window);
return;
}
if(ew->is_docked)
{
cpu_registers_attach(ew);
}
else /* Is not docked */
{
gtk_widget_set_uposition(ew->widgets.window, ew->win_pos_x, ew->win_pos_y);
gtk_window_set_default_size(GTK_WINDOW(ew->widgets.window), ew->win_width, ew->win_height);
gtk_widget_show(ew->widgets.window);
gdk_window_raise(ew->widgets.window->window);
}
gtk_widget_set_uposition(ew->widgets.window, ew->win_pos_x, ew->win_pos_y);
gtk_window_set_default_size(GTK_WINDOW(ew->widgets.window), ew->win_width, ew->win_height);
gtk_widget_show(ew->widgets.window);
ew->is_showing = TRUE;
}
}
......@@ -113,51 +103,19 @@ cpu_registers_hide(CpuRegisters* ew)
if(ew)
{
if(ew->is_showing == FALSE) return;
if(ew->is_docked == TRUE)
{
cpu_registers_detach(ew);
}
else /* Is not docked */
{
gdk_window_get_root_origin(ew ->widgets.window->window, &ew->win_pos_x, &ew->win_pos_y);
gdk_window_get_size(ew ->widgets.window->window, &ew->win_width, &ew->win_height);
gtk_widget_hide(ew->widgets.window);
}
gdk_window_get_root_origin(ew ->widgets.window->window, &ew->win_pos_x, &ew->win_pos_y);
gdk_window_get_size(ew ->widgets.window->window, &ew->win_width, &ew->win_height);
gtk_widget_hide(ew->widgets.window);
ew->is_showing = FALSE;
}
}
void
cpu_registers_attach(CpuRegisters* ew)
{
}
void
cpu_registers_detach(CpuRegisters* ew)
{
}
void
cpu_registers_dock(CpuRegisters* ew)
{
}
void
cpu_registers_undock(CpuRegisters* ew)
{
}
gboolean
cpu_registers_save_yourself(CpuRegisters* ew, FILE* stream)
{
if (!ew) return FALSE;
fprintf(stream, "registers.is.docked=%d\n", ew->is_docked);
if (ew->is_showing && !ew->is_docked)
if (ew->is_showing)
{
gdk_window_get_root_origin (ew->widgets.window->window, &ew->win_pos_x,
&ew->win_pos_y);
......@@ -173,18 +131,12 @@ cpu_registers_save_yourself(CpuRegisters* ew, FILE* stream)
gboolean
cpu_registers_load_yourself(CpuRegisters* ew, PropsID props)
{
gboolean dock_flag;
if (!ew) return FALSE;
dock_flag = prop_get_int (props, "registers.is.docked", 0);
ew->win_pos_x = prop_get_int (props, "registers.win.pos.x", 250);
ew->win_pos_y = prop_get_int (props, "registers.win.pos.y", 100);
ew->win_width = prop_get_int (props, "registers.win.width", 200);
ew->win_height = prop_get_int (props, "registers.win.height", 300);
if (dock_flag)
cpu_registers_dock (ew);
else
cpu_registers_undock (ew);
return TRUE;
}
......
......@@ -40,7 +40,6 @@ struct _CpuRegisters
CpuRegistersGui widgets;
gint current_index;
gboolean is_showing;
gboolean is_docked;
gint win_pos_x, win_pos_y, win_width, win_height;
};
......@@ -74,18 +73,6 @@ cpu_registers_show(CpuRegisters * ew);
void
cpu_registers_hide(CpuRegisters * ew);
void
cpu_registers_attach(CpuRegisters * ew);
void
cpu_registers_detach(CpuRegisters * ew);
void
cpu_registers_dock(CpuRegisters * ew);
void
cpu_registers_undock(CpuRegisters * ew);
void
registers_update_controls(CpuRegisters* ew);
......
......@@ -60,18 +60,6 @@ on_register_update_activate (GtkMenuItem *menuitem,
debugger_execute_cmd_in_queqe();
}
void
on_register_dock_undock_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
CpuRegisters *cr;
cr = debugger.cpu_registers;
if(cr->is_docked) cpu_registers_undock(cr);
else cpu_registers_dock(cr);
}
void
on_register_help_activate (GtkMenuItem *menuitem,
gpointer user_data)
......
......@@ -37,10 +37,6 @@ void
on_register_update_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_register_dock_undock_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_register_help_activate (GtkMenuItem *menuitem,
gpointer user_data);
......
......@@ -49,13 +49,6 @@ static GnomeUIInfo register_menu_uiinfo[] =
0, 0, NULL
},
GNOMEUIINFO_SEPARATOR,
{
GNOME_APP_UI_ITEM, N_("Dock/Undock"),
NULL,
on_register_dock_undock_activate, NULL, NULL,
GNOME_APP_PIXMAP_NONE, NULL,
0, 0, NULL
},
{
GNOME_APP_UI_ITEM, N_("Help"),
NULL,
......
......@@ -36,7 +36,8 @@ Sharedlibs* sharedlibs_new()
ew = g_malloc(sizeof(Sharedlibs));
if(ew)
{
ew->win_width = 410;
ew->is_showing = FALSE;
ew->win_width = 410;
ew->win_height = 370;
ew->win_pos_x = 120;
ew->win_pos_x = 140;
......@@ -87,20 +88,12 @@ sharedlibs_show(Sharedlibs* ew)
{
if(ew->is_showing)
{
if(ew->is_docked == FALSE)
gdk_window_raise(ew->widgets.window->window);
return;
}
if(ew->is_docked)
{
sharedlibs_attach(ew);
}
else /* Is not docked */
{
gtk_widget_set_uposition(ew->widgets.window, ew->win_pos_x, ew->win_pos_y);
gtk_window_set_default_size(GTK_WINDOW(ew->widgets.window), ew->win_width, ew->win_height);
gtk_widget_show(ew->widgets.window);
}
gdk_window_raise(ew->widgets.window->window);
return;
}
gtk_widget_set_uposition(ew->widgets.window, ew->win_pos_x, ew->win_pos_y);
gtk_window_set_default_size(GTK_WINDOW(ew->widgets.window), ew->win_width, ew->win_height);
gtk_widget_show(ew->widgets.window);
ew->is_showing = TRUE;
}
}
......@@ -111,51 +104,19 @@ sharedlibs_hide(Sharedlibs* ew)
if(ew)
{
if(ew->is_showing == FALSE) return;
if(ew->is_docked == TRUE)
{
sharedlibs_detach(ew);
}
else /* Is not docked */
{
gdk_window_get_root_origin(ew ->widgets.window->window, &ew->win_pos_x, &ew->win_pos_y);
gdk_window_get_size(ew ->widgets.window->window, &ew->win_width, &ew->win_height);
gtk_widget_hide(ew->widgets.window);
}
gdk_window_get_root_origin(ew ->widgets.window->window, &ew->win_pos_x, &ew->win_pos_y);
gdk_window_get_size(ew ->widgets.window->window, &ew->win_width, &ew->win_height);
gtk_widget_hide(ew->widgets.window);
ew->is_showing = FALSE;
}
}
void
sharedlibs_attach(Sharedlibs* ew)
{
}
void
sharedlibs_detach(Sharedlibs* ew)
{
}
void
sharedlibs_dock(Sharedlibs* ew)
{
}
void
sharedlibs_undock(Sharedlibs* ew)
{
}
gboolean
sharedlibs_save_yourself(Sharedlibs* ew, FILE* stream)
{
if (!ew) return FALSE;
fprintf(stream, "sharedlibs.is.docked=%d\n", ew->is_docked);
if (ew->is_showing && !ew->is_docked)
if (ew->is_showing)
{
gdk_window_get_root_origin (ew->widgets.window->window, &ew->win_pos_x,
&ew->win_pos_y);
......@@ -171,18 +132,12 @@ sharedlibs_save_yourself(Sharedlibs* ew, FILE* stream)
gboolean
sharedlibs_load_yourself(Sharedlibs* ew, PropsID props)
{
gboolean dock_flag;
if (!ew) return FALSE;
dock_flag = prop_get_int (props, "sharedlibs.is.docked", 0);
ew->win_pos_x = prop_get_int (props, "sharedlibs.win.pos.x", 410);
ew->win_pos_y = prop_get_int (props, "sharedlibs.win.pos.y", 370);
ew->win_width = prop_get_int (props, "sharedlibs.win.width", 120);
ew->win_height = prop_get_int (props, "sharedlibs.win.height", 140);
if (dock_flag)
sharedlibs_dock (ew);
else
sharedlibs_undock (ew);
return TRUE;
}
......
......@@ -38,7 +38,6 @@ struct _Sharedlibs
{
SharedlibsGui widgets;
gboolean is_showing;
gboolean is_docked;
gint win_pos_x, win_pos_y, win_width, win_height;
};
......@@ -72,18 +71,6 @@ sharedlibs_show(Sharedlibs * ew);
void
sharedlibs_hide(Sharedlibs * ew);
void
sharedlibs_attach(Sharedlibs * ew);
void
sharedlibs_detach(Sharedlibs * ew);
void
sharedlibs_dock(Sharedlibs * ew);
void
sharedlibs_undock(Sharedlibs * ew);
void
sharedlibs_update_controls(Sharedlibs* ew);
......
......@@ -41,18 +41,6 @@ on_sharedlibs_update_activate (GtkMenuItem *menuitem,
debugger_execute_cmd_in_queqe();
}
void
on_sharedlibs_dock_undock_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
Sharedlibs *sl;
sl = debugger.sharedlibs;
if(sl->is_docked) sharedlibs_undock(sl);
else sharedlibs_dock(sl);
}
void
on_sharedlibs_help_activate (GtkMenuItem *menuitem,
gpointer user_data)
......
......@@ -26,11 +26,6 @@ on_sharedlibs_delete_event(GtkWidget* w, GdkEvent* event, gpointer data);
void
on_sharedlibs_update_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_sharedlibs_dock_undock_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_sharedlibs_help_activate (GtkMenuItem *menuitem,
gpointer user_data);
......
......@@ -42,13 +42,6 @@ static GnomeUIInfo sharedlibs_menu_uiinfo[] =
0, 0, NULL
},
GNOMEUIINFO_SEPARATOR,
{
GNOME_APP_UI_ITEM, N_("Dock/Undock"),
NULL,
on_sharedlibs_dock_undock_activate, NULL, NULL,
GNOME_APP_PIXMAP_NONE, NULL,
0, 0, NULL
},
{
GNOME_APP_UI_ITEM, N_("Help"),
NULL,
......
......@@ -38,7 +38,6 @@ signals_new ()
ew = g_malloc (sizeof (Signals));
if (ew)
{
ew->is_docked = FALSE;
ew->is_showing = FALSE;
ew->win_width = 460;
ew->win_height = 320;
......@@ -116,22 +115,14 @@ signals_show (Signals * ew)
{
if (ew->is_showing)
{
if (ew->is_docked == FALSE)
gdk_window_raise (ew->widgets.window->window);
return;
}
if (ew->is_docked)
{
signals_attach (ew);
gdk_window_raise (ew->widgets.window->window);
return;
}
else /* Is not docked */
{
gtk_widget_set_uposition (ew->widgets.window, ew->win_pos_x,
gtk_widget_set_uposition (ew->widgets.window, ew->win_pos_x,
ew->win_pos_y);
gtk_window_set_default_size (GTK_WINDOW (ew->widgets.window),
gtk_window_set_default_size (GTK_WINDOW (ew->widgets.window),
ew->win_width, ew->win_height);
gtk_widget_show (ew->widgets.window);
}
gtk_widget_show (ew->widgets.window);
ew->is_showing = TRUE;
}
}
......@@ -143,53 +134,21 @@ signals_hide (Signals * ew)
{
if (ew->is_showing == FALSE)
return;
if (ew->is_docked == TRUE)
{
signals_detach (ew);
}
else /* Is not docked */
{
gdk_window_get_root_origin (ew->widgets.window->window, &ew->win_pos_x,
&ew->win_pos_y);
gdk_window_get_size (ew->widgets.window->window, &ew->win_width,
&ew->win_height);
gtk_widget_hide (ew->widgets.window);
}
gdk_window_get_root_origin (ew->widgets.window->window, &ew->win_pos_x,
&ew->win_pos_y);
gdk_window_get_size (ew->widgets.window->window, &ew->win_width,
&ew->win_height);
gtk_widget_hide (ew->widgets.window);
ew->is_showing = FALSE;
}
}
void
signals_attach (Signals * ew)
{
}
void
signals_detach (Signals * ew)
{
}
void
signals_dock (Signals * ew)
{
}
void
signals_undock (Signals * ew)
{
}
gboolean
signals_save_yourself (Signals * ew, FILE * stream)
{
if (!ew) return FALSE;
fprintf(stream, "signals.is.docked=%d\n", ew->is_docked);
if (ew->is_showing && !ew->is_docked)
if (ew->is_showing)
{
gdk_window_get_root_origin (ew->widgets.window->window, &ew->win_pos_x,
&ew->win_pos_y);
......@@ -205,18 +164,12 @@ signals_save_yourself (Signals * ew, FILE * stream)
gboolean
signals_load_yourself (Signals * ew, PropsID props)
{
gboolean dock_flag;
if (!ew) return FALSE;
dock_flag = prop_get_int (props, "signals.is.docked", 0);
ew->win_pos_x = prop_get_int (props, "signals.win.pos.x", 460);
ew->win_pos_y = prop_get_int (props, "signals.win.pos.y", 320);
ew->win_width = prop_get_int (props, "signals.win.width", 50);
ew->win_height = prop_get_int (props, "signals.win.height", 130);
if (dock_flag)
signals_dock (ew);
else
signals_undock (ew);
return TRUE;
}
......
......@@ -40,7 +40,6 @@ struct _Signals
{
SignalsGui widgets;
gboolean is_showing;
gboolean is_docked;
gint win_pos_x, win_pos_y, win_width, win_height;
gint index;
gchar *signal;
......@@ -79,18 +78,6 @@ signals_show(Signals * ew);
void
signals_hide(Signals * ew);
void
signals_attach(Signals * ew);
void
signals_detach(Signals * ew);
void
signals_dock(Signals * ew);
void
signals_undock(Signals * ew);
void
signals_update_controls(Signals* ew);
......
......@@ -93,18 +93,6 @@ on_signals_update_activate (GtkMenuItem *menuitem,
debugger_execute_cmd_in_queqe();
}
void
on_signals_dock_undock_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
Signals *cr;
cr = debugger.signals;
if(cr->is_docked) signals_undock(cr);
else signals_dock(cr);
}
void
on_signals_help_activate (GtkMenuItem *menuitem,
gpointer user_data)
......
......@@ -41,11 +41,7 @@ on_signals_send_activate (GtkMenuItem *menuitem,
void
on_signals_update_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_signals_dock_undock_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_signals_help_activate (GtkMenuItem *menuitem,
gpointer user_data);
......
......@@ -55,13 +55,6 @@ static GnomeUIInfo signals_menu_uiinfo[] =
0, 0, NULL
},
GNOMEUIINFO_SEPARATOR,
{
GNOME_APP_UI_ITEM, N_("Dock/Undock"),
NULL,
on_signals_dock_undock_activate, NULL, NULL,
GNOME_APP_PIXMAP_NONE, NULL,
0, 0, NULL
},
{
GNOME_APP_UI_ITEM, N_("Help"),
NULL,
......
......@@ -53,7 +53,6 @@ stack_trace_new ()
st->current_index = -1;
st->current_frame = 0;
st->is_showing = FALSE;
st->is_docked = FALSE;
st->win_pos_x = 30;
st->win_pos_y = 200;
st->win_width = 400;
......@@ -179,25 +178,17 @@ stack_trace_show (StackTrace * st)
{
if (st->is_showing)
{
if (st->is_docked == FALSE)
gdk_window_raise (st->widgets.window->window);
gdk_window_raise (st->widgets.window->window);
return;
}
if (st->is_docked)
{
stack_trace_attach (st);
}
else /* Is not docked */
{
gtk_widget_set_uposition (st->widgets.window,
gtk_widget_set_uposition (st->widgets.window,
st->win_pos_x,
st->win_pos_y);
gtk_window_set_default_size (GTK_WINDOW
gtk_window_set_default_size (GTK_WINDOW
(st->widgets.window),
st->win_width,
st->win_height);
gtk_widget_show (st->widgets.window);
}
gtk_widget_show (st->widgets.window);
st->is_showing = TRUE;
}
}
......@@ -209,55 +200,23 @@ stack_trace_hide (StackTrace * st)
{
if (st->is_showing == FALSE)
return;
if (st->is_docked == TRUE)
{
stack_trace_detach (st);
}
else /* Is not docked */
{
gdk_window_get_root_origin (st->widgets.window->
gdk_window_get_root_origin (st->widgets.window->
window, &st->win_pos_x,
&st->win_pos_y);
gdk_window_get_size (st->widgets.window->window,
&st->win_width, &st->win_height);
gtk_widget_hide (st->widgets.window);
}
gdk_window_get_size (st->widgets.window->window,
&st->win_width, &st->win_height);
gtk_widget_hide (st->widgets.window);
st->is_showing = FALSE;
}
}
void
stack_trace_attach (StackTrace * st)
{
}
void
stack_trace_detach (StackTrace * st)
{
}
void
stack_trace_dock (StackTrace * st)
{
}
void
stack_trace_undock (StackTrace * st)
{
}
gboolean
stack_trace_save_yourself (StackTrace * st, FILE * stream)
{
if (!st)
return FALSE;
fprintf (stream, "stack.trace.is.docked=%d\n", st->is_docked);
if (st->is_showing && !st->is_docked)
if (st->is_showing)
{
gdk_window_get_root_origin (st->widgets.window->window,
&st->win_pos_x, &st->win_pos_y);
......@@ -274,19 +233,13 @@ stack_trace_save_yourself (StackTrace * st, FILE * stream)
gboolean
stack_trace_load_yourself (StackTrace * st, PropsID props)
{
gboolean dock_flag;
if (!st)
return FALSE;
dock_flag = prop_get_int (props, "stack.trace.is.docked", 0);
st->win_pos_x = prop_get_int (props, "stack.trace.win.pos.x", 30);
st->win_pos_y = prop_get_int (props, "stack.trace.win.pos.y", 200);
st->win_width = prop_get_int (props, "stack.trace.win.width", 400);
st->win_height = prop_get_int (props, "stack.trace.win.height", 150);
if (dock_flag)
stack_trace_dock (st);
else
stack_trace_undock (st);
return TRUE;
}
......
......@@ -43,7 +43,6 @@ struct _StackTrace
gint current_index;
gint current_frame;
gboolean is_showing;
gboolean is_docked;
gint win_pos_x, win_pos_y, win_width, win_height;
};
......@@ -69,12 +68,4 @@ void stack_trace_show (StackTrace * st);
void stack_trace_hide (StackTrace * st);
void stack_trace_attach (StackTrace * st);
void stack_trace_detach (StackTrace * st);
void stack_trace_dock (StackTrace * st);
void stack_trace_undock (StackTrace * st);
#endif
......@@ -140,18 +140,6 @@ on_stack_view_src_activate (GtkMenuItem * menuitem, gpointer user_data)
}
void
on_stack_dock_undock_activate (GtkMenuItem * menuitem, gpointer user_data)
{
StackTrace *cr;
cr = debugger.stack;
if (cr->is_docked)
stack_trace_undock (cr);
else
stack_trace_dock (cr);
}
void
on_stack_help_activate (GtkMenuItem * menuitem, gpointer user_data)