Skip to content
Browse files

- Added the breakpoint store

- Added a proper icon.

SVN Rev: 2185
  • Loading branch information...
1 parent 78c315f commit 3443bc7d3544d8e0f67847a91b34332a2a55db89 @derickr committed
Showing with 210 additions and 112 deletions.
  1. +22 −23 gtkdbgp.glade
  2. BIN pixmaps/xdebug16.png
  3. +64 −0 src/callbacks.c
  4. +18 −0 src/globals.h
  5. +85 −86 src/interface.c
  6. +21 −3 src/main.c
View
45 gtkdbgp.glade
@@ -13,7 +13,7 @@
<property name="modal">False</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">True</property>
- <property name="icon">run.png</property>
+ <property name="icon">xdebug16.png</property>
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
@@ -674,7 +674,7 @@
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child>
- <widget class="GtkTreeView" id="treeview6">
+ <widget class="GtkTreeView" id="breakpoint_view">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="headers_visible">True</property>
@@ -1169,7 +1169,7 @@
<property name="column_spacing">0</property>
<child>
- <widget class="GtkEntry" id="entry6">
+ <widget class="GtkEntry" id="bp_filename">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
@@ -1190,7 +1190,7 @@
</child>
<child>
- <widget class="GtkEntry" id="entry7">
+ <widget class="GtkEntry" id="bp_linenumber">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
@@ -1224,7 +1224,7 @@
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
- <property name="mnemonic_widget">entry6</property>
+ <property name="mnemonic_widget">bp_filename</property>
<property name="ellipsize">PANGO_ELLIPSIZE_START</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
@@ -1256,7 +1256,7 @@
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
- <property name="mnemonic_widget">entry7</property>
+ <property name="mnemonic_widget">bp_linenumber</property>
<property name="ellipsize">PANGO_ELLIPSIZE_START</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
@@ -1359,7 +1359,7 @@
<property name="column_spacing">0</property>
<child>
- <widget class="GtkEntry" id="classname">
+ <widget class="GtkEntry" id="bp_classname">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
@@ -1380,7 +1380,7 @@
</child>
<child>
- <widget class="GtkEntry" id="functionname">
+ <widget class="GtkEntry" id="bp_functionname">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
@@ -1414,7 +1414,7 @@
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
- <property name="mnemonic_widget">classname</property>
+ <property name="mnemonic_widget">bp_classname</property>
<property name="ellipsize">PANGO_ELLIPSIZE_START</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
@@ -1446,7 +1446,7 @@
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
- <property name="mnemonic_widget">functionname</property>
+ <property name="mnemonic_widget">bp_functionname</property>
<property name="ellipsize">PANGO_ELLIPSIZE_START</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
@@ -1549,7 +1549,7 @@
<property name="column_spacing">0</property>
<child>
- <widget class="GtkEntry" id="exceptionname">
+ <widget class="GtkEntry" id="bp_exceptionname">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
@@ -1583,7 +1583,7 @@
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
- <property name="mnemonic_widget">exceptionname</property>
+ <property name="mnemonic_widget">bp_exceptionname</property>
<property name="ellipsize">PANGO_ELLIPSIZE_START</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
@@ -1712,7 +1712,7 @@
<property name="spacing">0</property>
<child>
- <widget class="GtkRadioButton" id="hitcondition">
+ <widget class="GtkRadioButton" id="bp_hitcondition">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">A_lways</property>
@@ -1741,7 +1741,7 @@
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
- <property name="group">hitcondition</property>
+ <property name="group">bp_hitcondition</property>
</widget>
<packing>
<property name="padding">0</property>
@@ -1761,7 +1761,7 @@
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
- <property name="group">hitcondition</property>
+ <property name="group">bp_hitcondition</property>
</widget>
<packing>
<property name="padding">0</property>
@@ -1781,7 +1781,7 @@
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
- <property name="group">hitcondition</property>
+ <property name="group">bp_hitcondition</property>
</widget>
<packing>
<property name="padding">0</property>
@@ -1824,7 +1824,6 @@
<property name="yalign">0.0399999991059</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
- <property name="mnemonic_widget">hitcondition</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
@@ -1842,7 +1841,7 @@
</child>
<child>
- <widget class="GtkSpinButton" id="hitvalue">
+ <widget class="GtkSpinButton" id="bp_hitvalue">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="climb_rate">1</property>
@@ -1863,7 +1862,7 @@
</child>
<child>
- <widget class="GtkCheckButton" id="temporary">
+ <widget class="GtkCheckButton" id="bp_temporary">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Temporary breakpoints will be automatically deleted after the first time they have been hit.</property>
<property name="can_focus">True</property>
@@ -1899,7 +1898,7 @@
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
- <property name="mnemonic_widget">hitvalue</property>
+ <property name="mnemonic_widget">bp_hitvalue</property>
<property name="ellipsize">PANGO_ELLIPSIZE_START</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
@@ -1931,7 +1930,7 @@
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
- <property name="mnemonic_widget">temporary</property>
+ <property name="mnemonic_widget">bp_temporary</property>
<property name="ellipsize">PANGO_ELLIPSIZE_START</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
@@ -1950,7 +1949,7 @@
</child>
<child>
- <widget class="GtkCheckButton" id="enabled">
+ <widget class="GtkCheckButton" id="bp_enabled">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Ena_bled</property>
@@ -1985,7 +1984,7 @@
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
- <property name="mnemonic_widget">temporary</property>
+ <property name="mnemonic_widget">bp_enabled</property>
<property name="ellipsize">PANGO_ELLIPSIZE_START</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
View
BIN pixmaps/xdebug16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
64 src/callbacks.c
@@ -4,6 +4,7 @@
#include <gtk/gtk.h>
#include <gconf/gconf.h>
+#include <string.h>
#include "callbacks.h"
#include "interface.h"
@@ -11,6 +12,7 @@
#include "globals.h"
extern ClientState *client_state;
+extern GtkWidget* MainWindow;
extern GtkWidget* DebuggerSettingsWindow;
extern GtkWidget* AddBreakPointWindow;
@@ -292,6 +294,68 @@ void
on_add_bp_add_button_activate (GtkButton *button,
gpointer user_data)
{
+ GtkNotebook *notebook;
+ GtkEntry *entry1, *entry2;
+ int col1, col2;
+ GtkTreeView *breakpoint_view;
+ GtkListStore *store;
+ GtkTreeIter iter;
+ gchar *display_string, *type;
+ const gchar *string1, *string2;
+
+ breakpoint_view = GTK_TREE_VIEW(lookup_widget(GTK_WIDGET(MainWindow), "breakpoint_view"));
+ store = GTK_LIST_STORE(gtk_tree_view_get_model(breakpoint_view));
+
+ /* Figure out which tab was selected */
+ notebook = GTK_NOTEBOOK(lookup_widget(GTK_WIDGET(AddBreakPointWindow), "breakpoint_type_notebook"));
+ switch (gtk_notebook_get_current_page(notebook)) {
+ case 0:
+ /* file/line */
+ entry1 = GTK_ENTRY(lookup_widget(GTK_WIDGET(AddBreakPointWindow), "bp_filename"));
+ entry2 = GTK_ENTRY(lookup_widget(GTK_WIDGET(AddBreakPointWindow), "bp_linenumber"));
+ string1 = gtk_entry_get_text(entry1);
+ string2 = gtk_entry_get_text(entry2);
+ type = "line";
+ col1 = BREAKPOINT_FILE_NAME_COLUMN;
+ col2 = BREAKPOINT_LINENO_COLUMN;
+ display_string = xdebug_sprintf("%s:%s", string1, string2);
+ break;
+ case 1:
+ /* class/function */
+ entry1 = GTK_ENTRY(lookup_widget(GTK_WIDGET(AddBreakPointWindow), "bp_classname"));
+ entry2 = GTK_ENTRY(lookup_widget(GTK_WIDGET(AddBreakPointWindow), "bp_functionname"));
+ string1 = gtk_entry_get_text(entry1);
+ string2 = gtk_entry_get_text(entry2);
+ display_string = xdebug_sprintf("%s::%s", string1, string2);
+ type = "call";
+ col1 = BREAKPOINT_CLASS_NAME_COLUMN;
+ col2 = BREAKPOINT_FUNCTION_NAME_COLUMN;
+ break;
+ case 2:
+ /* exception */
+ entry1 = GTK_ENTRY(lookup_widget(GTK_WIDGET(AddBreakPointWindow), "bp_exceptionname"));
+ string1 = gtk_entry_get_text(entry1);
+ string2 = "";
+ display_string = xdstrdup(string1);
+ type = "exception";
+ col1 = BREAKPOINT_EXCEPTION_NAME_COLUMN;
+ col2 = BREAKPOINT_LINENO_COLUMN; /* dummy */
+ break;
+ }
+
+ gtk_list_store_append(store, &iter);
+ gtk_list_store_set(store, &iter,
+ BREAKPOINT_TYPE_COLUMN, type,
+ BREAKPOINT_WHAT_COLUMN, display_string,
+ col1, string1,
+ col2, string2,
+ BREAKPOINT_ENABLED_COLUMN, 1,
+ BREAKPOINT_TEMPORARY_COLUMN, 0,
+ BREAKPOINT_HIT_CONDITION_COLUMN, "",
+ BREAKPOINT_HIT_VALUE_COLUMN, 0,
+ BREAKPOINT_HIT_VALUE_COLUMN, 0,
+ -1);
+ xdfree(display_string);
gtk_widget_hide(AddBreakPointWindow);
}
View
18 src/globals.h
@@ -73,6 +73,24 @@ enum
enum
{
+ BREAKPOINT_ID_COLUMN = 0,
+ BREAKPOINT_TYPE_COLUMN,
+ BREAKPOINT_ENABLED_COLUMN,
+ BREAKPOINT_WHAT_COLUMN,
+ BREAKPOINT_FILE_NAME_COLUMN,
+ BREAKPOINT_LINENO_COLUMN,
+ BREAKPOINT_CLASS_NAME_COLUMN,
+ BREAKPOINT_FUNCTION_NAME_COLUMN,
+ BREAKPOINT_EXCEPTION_NAME_COLUMN,
+ BREAKPOINT_HIT_CONDITION_COLUMN,
+ BREAKPOINT_HIT_VALUE_COLUMN,
+ BREAKPOINT_HIT_COUNT_COLUMN,
+ BREAKPOINT_TEMPORARY_COLUMN,
+ BREAKPOINT_N_COLUMNS
+};
+
+enum
+{
DBGPCLIENT_FETCH_MORE = 1,
DBGPCLIENT_FETCH_PAGES = 2
};
View
171 src/interface.c
@@ -89,7 +89,7 @@ create_MainWindow (void)
GtkWidget *label36;
GtkWidget *vbox9;
GtkWidget *scrolledwindow11;
- GtkWidget *treeview6;
+ GtkWidget *breakpoint_view;
GtkWidget *hbuttonbox1;
GtkWidget *main_add_bp_button;
GtkWidget *alignment17;
@@ -128,7 +128,7 @@ create_MainWindow (void)
gtk_widget_set_size_request (MainWindow, 900, 600);
gtk_window_set_title (GTK_WINDOW (MainWindow), "Xdebug client");
gtk_window_set_destroy_with_parent (GTK_WINDOW (MainWindow), TRUE);
- MainWindow_icon_pixbuf = create_pixbuf ("run.png");
+ MainWindow_icon_pixbuf = create_pixbuf ("xdebug16.png");
if (MainWindow_icon_pixbuf)
{
gtk_window_set_icon (GTK_WINDOW (MainWindow), MainWindow_icon_pixbuf);
@@ -480,11 +480,11 @@ create_MainWindow (void)
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow11), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow11), GTK_SHADOW_IN);
- treeview6 = gtk_tree_view_new ();
- gtk_widget_set_name (treeview6, "treeview6");
- gtk_widget_show (treeview6);
- gtk_container_add (GTK_CONTAINER (scrolledwindow11), treeview6);
- gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview6), TRUE);
+ breakpoint_view = gtk_tree_view_new ();
+ gtk_widget_set_name (breakpoint_view, "breakpoint_view");
+ gtk_widget_show (breakpoint_view);
+ gtk_container_add (GTK_CONTAINER (scrolledwindow11), breakpoint_view);
+ gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (breakpoint_view), TRUE);
hbuttonbox1 = gtk_hbutton_box_new ();
gtk_widget_set_name (hbuttonbox1, "hbuttonbox1");
@@ -754,7 +754,7 @@ create_MainWindow (void)
GLADE_HOOKUP_OBJECT (MainWindow, label36, "label36");
GLADE_HOOKUP_OBJECT (MainWindow, vbox9, "vbox9");
GLADE_HOOKUP_OBJECT (MainWindow, scrolledwindow11, "scrolledwindow11");
- GLADE_HOOKUP_OBJECT (MainWindow, treeview6, "treeview6");
+ GLADE_HOOKUP_OBJECT (MainWindow, breakpoint_view, "breakpoint_view");
GLADE_HOOKUP_OBJECT (MainWindow, hbuttonbox1, "hbuttonbox1");
GLADE_HOOKUP_OBJECT (MainWindow, main_add_bp_button, "main_add_bp_button");
GLADE_HOOKUP_OBJECT (MainWindow, alignment17, "alignment17");
@@ -797,8 +797,8 @@ create_AddBreakPointWindow (void)
GtkWidget *frame7;
GtkWidget *alignment29;
GtkWidget *table7;
- GtkWidget *entry6;
- GtkWidget *entry7;
+ GtkWidget *bp_filename;
+ GtkWidget *bp_linenumber;
GtkWidget *filename;
GtkWidget *linenumber;
GtkWidget *label56;
@@ -806,8 +806,8 @@ create_AddBreakPointWindow (void)
GtkWidget *frame5;
GtkWidget *alignment27;
GtkWidget *table5;
- GtkWidget *classname;
- GtkWidget *functionname;
+ GtkWidget *bp_classname;
+ GtkWidget *bp_functionname;
GtkWidget *label47;
GtkWidget *label50;
GtkWidget *label49;
@@ -815,7 +815,7 @@ create_AddBreakPointWindow (void)
GtkWidget *frame6;
GtkWidget *alignment28;
GtkWidget *table6;
- GtkWidget *exceptionname;
+ GtkWidget *bp_exceptionname;
GtkWidget *label51;
GtkWidget *label53;
GtkWidget *exception_label;
@@ -824,19 +824,19 @@ create_AddBreakPointWindow (void)
GtkWidget *alignment2;
GtkWidget *table8;
GtkWidget *vbox12;
- GtkWidget *hitcondition;
- GSList *hitcondition_group = NULL;
+ GtkWidget *bp_hitcondition;
+ GSList *bp_hitcondition_group = NULL;
GtkWidget *radiobutton2;
GtkWidget *radiobutton3;
GtkWidget *radiobutton4;
GtkWidget *alignment30;
GtkWidget *label57;
- GtkObject *hitvalue_adj;
- GtkWidget *hitvalue;
- GtkWidget *temporary;
+ GtkObject *bp_hitvalue_adj;
+ GtkWidget *bp_hitvalue;
+ GtkWidget *bp_temporary;
GtkWidget *label58;
GtkWidget *label59;
- GtkWidget *enabled;
+ GtkWidget *bp_enabled;
GtkWidget *label60;
GtkWidget *condition_frame_label;
GtkWidget *alignment32;
@@ -890,17 +890,17 @@ create_AddBreakPointWindow (void)
gtk_widget_show (table7);
gtk_container_add (GTK_CONTAINER (alignment29), table7);
- entry6 = gtk_entry_new ();
- gtk_widget_set_name (entry6, "entry6");
- gtk_widget_show (entry6);
- gtk_table_attach (GTK_TABLE (table7), entry6, 1, 2, 0, 1,
+ bp_filename = gtk_entry_new ();
+ gtk_widget_set_name (bp_filename, "bp_filename");
+ gtk_widget_show (bp_filename);
+ gtk_table_attach (GTK_TABLE (table7), bp_filename, 1, 2, 0, 1,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
- entry7 = gtk_entry_new ();
- gtk_widget_set_name (entry7, "entry7");
- gtk_widget_show (entry7);
- gtk_table_attach (GTK_TABLE (table7), entry7, 1, 2, 1, 2,
+ bp_linenumber = gtk_entry_new ();
+ gtk_widget_set_name (bp_linenumber, "bp_linenumber");
+ gtk_widget_show (bp_linenumber);
+ gtk_table_attach (GTK_TABLE (table7), bp_linenumber, 1, 2, 1, 2,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
@@ -953,17 +953,17 @@ create_AddBreakPointWindow (void)
gtk_widget_show (table5);
gtk_container_add (GTK_CONTAINER (alignment27), table5);
- classname = gtk_entry_new ();
- gtk_widget_set_name (classname, "classname");
- gtk_widget_show (classname);
- gtk_table_attach (GTK_TABLE (table5), classname, 1, 2, 0, 1,
+ bp_classname = gtk_entry_new ();
+ gtk_widget_set_name (bp_classname, "bp_classname");
+ gtk_widget_show (bp_classname);
+ gtk_table_attach (GTK_TABLE (table5), bp_classname, 1, 2, 0, 1,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
- functionname = gtk_entry_new ();
- gtk_widget_set_name (functionname, "functionname");
- gtk_widget_show (functionname);
- gtk_table_attach (GTK_TABLE (table5), functionname, 1, 2, 1, 2,
+ bp_functionname = gtk_entry_new ();
+ gtk_widget_set_name (bp_functionname, "bp_functionname");
+ gtk_widget_show (bp_functionname);
+ gtk_table_attach (GTK_TABLE (table5), bp_functionname, 1, 2, 1, 2,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
@@ -1016,10 +1016,10 @@ create_AddBreakPointWindow (void)
gtk_widget_show (table6);
gtk_container_add (GTK_CONTAINER (alignment28), table6);
- exceptionname = gtk_entry_new ();
- gtk_widget_set_name (exceptionname, "exceptionname");
- gtk_widget_show (exceptionname);
- gtk_table_attach (GTK_TABLE (table6), exceptionname, 1, 2, 0, 1,
+ bp_exceptionname = gtk_entry_new ();
+ gtk_widget_set_name (bp_exceptionname, "bp_exceptionname");
+ gtk_widget_show (bp_exceptionname);
+ gtk_table_attach (GTK_TABLE (table6), bp_exceptionname, 1, 2, 0, 1,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
@@ -1077,34 +1077,34 @@ create_AddBreakPointWindow (void)
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_FILL), 0, 0);
- hitcondition = gtk_radio_button_new_with_mnemonic (NULL, "A_lways");
- gtk_widget_set_name (hitcondition, "hitcondition");
- gtk_widget_show (hitcondition);
- gtk_box_pack_start (GTK_BOX (vbox12), hitcondition, FALSE, FALSE, 0);
- gtk_radio_button_set_group (GTK_RADIO_BUTTON (hitcondition), hitcondition_group);
- hitcondition_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (hitcondition));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (hitcondition), TRUE);
+ bp_hitcondition = gtk_radio_button_new_with_mnemonic (NULL, "A_lways");
+ gtk_widget_set_name (bp_hitcondition, "bp_hitcondition");
+ gtk_widget_show (bp_hitcondition);
+ gtk_box_pack_start (GTK_BOX (vbox12), bp_hitcondition, FALSE, FALSE, 0);
+ gtk_radio_button_set_group (GTK_RADIO_BUTTON (bp_hitcondition), bp_hitcondition_group);
+ bp_hitcondition_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (bp_hitcondition));
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (bp_hitcondition), TRUE);
radiobutton2 = gtk_radio_button_new_with_mnemonic (NULL, "_More than x hits");
gtk_widget_set_name (radiobutton2, "radiobutton2");
gtk_widget_show (radiobutton2);
gtk_box_pack_start (GTK_BOX (vbox12), radiobutton2, FALSE, FALSE, 0);
- gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton2), hitcondition_group);
- hitcondition_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton2));
+ gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton2), bp_hitcondition_group);
+ bp_hitcondition_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton2));
radiobutton3 = gtk_radio_button_new_with_mnemonic (NULL, "Exactl_y x hits");
gtk_widget_set_name (radiobutton3, "radiobutton3");
gtk_widget_show (radiobutton3);
gtk_box_pack_start (GTK_BOX (vbox12), radiobutton3, FALSE, FALSE, 0);
- gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton3), hitcondition_group);
- hitcondition_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton3));
+ gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton3), bp_hitcondition_group);
+ bp_hitcondition_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton3));
radiobutton4 = gtk_radio_button_new_with_mnemonic (NULL, "A m_ultiple of x hits");
gtk_widget_set_name (radiobutton4, "radiobutton4");
gtk_widget_show (radiobutton4);
gtk_box_pack_start (GTK_BOX (vbox12), radiobutton4, FALSE, FALSE, 0);
- gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton4), hitcondition_group);
- hitcondition_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton4));
+ gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton4), bp_hitcondition_group);
+ bp_hitcondition_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton4));
alignment30 = gtk_alignment_new (1, 1, 1, 1);
gtk_widget_set_name (alignment30, "alignment30");
@@ -1120,22 +1120,22 @@ create_AddBreakPointWindow (void)
gtk_label_set_use_markup (GTK_LABEL (label57), TRUE);
gtk_misc_set_alignment (GTK_MISC (label57), 0.9, 0.04);
- hitvalue_adj = gtk_adjustment_new (1, 1, 10000, 1, 10, 10);
- hitvalue = gtk_spin_button_new (GTK_ADJUSTMENT (hitvalue_adj), 1, 0);
- gtk_widget_set_name (hitvalue, "hitvalue");
- gtk_widget_show (hitvalue);
- gtk_table_attach (GTK_TABLE (table8), hitvalue, 1, 2, 1, 2,
+ bp_hitvalue_adj = gtk_adjustment_new (1, 1, 10000, 1, 10, 10);
+ bp_hitvalue = gtk_spin_button_new (GTK_ADJUSTMENT (bp_hitvalue_adj), 1, 0);
+ gtk_widget_set_name (bp_hitvalue, "bp_hitvalue");
+ gtk_widget_show (bp_hitvalue);
+ gtk_table_attach (GTK_TABLE (table8), bp_hitvalue, 1, 2, 1, 2,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
- gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (hitvalue), TRUE);
+ gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (bp_hitvalue), TRUE);
- temporary = gtk_check_button_new_with_mnemonic ("_Temporary breakpoint");
- gtk_widget_set_name (temporary, "temporary");
- gtk_widget_show (temporary);
- gtk_table_attach (GTK_TABLE (table8), temporary, 1, 2, 2, 3,
+ bp_temporary = gtk_check_button_new_with_mnemonic ("_Temporary breakpoint");
+ gtk_widget_set_name (bp_temporary, "bp_temporary");
+ gtk_widget_show (bp_temporary);
+ gtk_table_attach (GTK_TABLE (table8), bp_temporary, 1, 2, 2, 3,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
- gtk_tooltips_set_tip (tooltips, temporary, "Temporary breakpoints will be automatically deleted after the first time they have been hit.", NULL);
+ gtk_tooltips_set_tip (tooltips, bp_temporary, "Temporary breakpoints will be automatically deleted after the first time they have been hit.", NULL);
label58 = gtk_label_new_with_mnemonic ("Hit value (_x):");
gtk_widget_set_name (label58, "label58");
@@ -1159,13 +1159,13 @@ create_AddBreakPointWindow (void)
gtk_misc_set_alignment (GTK_MISC (label59), 0, 0.5);
gtk_label_set_ellipsize (GTK_LABEL (label59), PANGO_ELLIPSIZE_START);
- enabled = gtk_check_button_new_with_mnemonic ("Ena_bled");
- gtk_widget_set_name (enabled, "enabled");
- gtk_widget_show (enabled);
- gtk_table_attach (GTK_TABLE (table8), enabled, 1, 2, 3, 4,
+ bp_enabled = gtk_check_button_new_with_mnemonic ("Ena_bled");
+ gtk_widget_set_name (bp_enabled, "bp_enabled");
+ gtk_widget_show (bp_enabled);
+ gtk_table_attach (GTK_TABLE (table8), bp_enabled, 1, 2, 3, 4,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (enabled), TRUE);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (bp_enabled), TRUE);
label60 = gtk_label_new_with_mnemonic ("");
gtk_widget_set_name (label60, "label60");
@@ -1258,15 +1258,14 @@ create_AddBreakPointWindow (void)
G_CALLBACK (on_add_bp_add_button_activate),
NULL);
- gtk_label_set_mnemonic_widget (GTK_LABEL (filename), entry6);
- gtk_label_set_mnemonic_widget (GTK_LABEL (linenumber), entry7);
- gtk_label_set_mnemonic_widget (GTK_LABEL (label47), classname);
- gtk_label_set_mnemonic_widget (GTK_LABEL (label50), functionname);
- gtk_label_set_mnemonic_widget (GTK_LABEL (label51), exceptionname);
- gtk_label_set_mnemonic_widget (GTK_LABEL (label57), hitcondition);
- gtk_label_set_mnemonic_widget (GTK_LABEL (label58), hitvalue);
- gtk_label_set_mnemonic_widget (GTK_LABEL (label59), temporary);
- gtk_label_set_mnemonic_widget (GTK_LABEL (label60), temporary);
+ gtk_label_set_mnemonic_widget (GTK_LABEL (filename), bp_filename);
+ gtk_label_set_mnemonic_widget (GTK_LABEL (linenumber), bp_linenumber);
+ gtk_label_set_mnemonic_widget (GTK_LABEL (label47), bp_classname);
+ gtk_label_set_mnemonic_widget (GTK_LABEL (label50), bp_functionname);
+ gtk_label_set_mnemonic_widget (GTK_LABEL (label51), bp_exceptionname);
+ gtk_label_set_mnemonic_widget (GTK_LABEL (label58), bp_hitvalue);
+ gtk_label_set_mnemonic_widget (GTK_LABEL (label59), bp_temporary);
+ gtk_label_set_mnemonic_widget (GTK_LABEL (label60), bp_enabled);
/* Store pointers to all widgets, for use by lookup_widget(). */
GLADE_HOOKUP_OBJECT_NO_REF (AddBreakPointWindow, AddBreakPointWindow, "AddBreakPointWindow");
@@ -1275,8 +1274,8 @@ create_AddBreakPointWindow (void)
GLADE_HOOKUP_OBJECT (AddBreakPointWindow, frame7, "frame7");
GLADE_HOOKUP_OBJECT (AddBreakPointWindow, alignment29, "alignment29");
GLADE_HOOKUP_OBJECT (AddBreakPointWindow, table7, "table7");
- GLADE_HOOKUP_OBJECT (AddBreakPointWindow, entry6, "entry6");
- GLADE_HOOKUP_OBJECT (AddBreakPointWindow, entry7, "entry7");
+ GLADE_HOOKUP_OBJECT (AddBreakPointWindow, bp_filename, "bp_filename");
+ GLADE_HOOKUP_OBJECT (AddBreakPointWindow, bp_linenumber, "bp_linenumber");
GLADE_HOOKUP_OBJECT (AddBreakPointWindow, filename, "filename");
GLADE_HOOKUP_OBJECT (AddBreakPointWindow, linenumber, "linenumber");
GLADE_HOOKUP_OBJECT (AddBreakPointWindow, label56, "label56");
@@ -1284,8 +1283,8 @@ create_AddBreakPointWindow (void)
GLADE_HOOKUP_OBJECT (AddBreakPointWindow, frame5, "frame5");
GLADE_HOOKUP_OBJECT (AddBreakPointWindow, alignment27, "alignment27");
GLADE_HOOKUP_OBJECT (AddBreakPointWindow, table5, "table5");
- GLADE_HOOKUP_OBJECT (AddBreakPointWindow, classname, "classname");
- GLADE_HOOKUP_OBJECT (AddBreakPointWindow, functionname, "functionname");
+ GLADE_HOOKUP_OBJECT (AddBreakPointWindow, bp_classname, "bp_classname");
+ GLADE_HOOKUP_OBJECT (AddBreakPointWindow, bp_functionname, "bp_functionname");
GLADE_HOOKUP_OBJECT (AddBreakPointWindow, label47, "label47");
GLADE_HOOKUP_OBJECT (AddBreakPointWindow, label50, "label50");
GLADE_HOOKUP_OBJECT (AddBreakPointWindow, label49, "label49");
@@ -1293,7 +1292,7 @@ create_AddBreakPointWindow (void)
GLADE_HOOKUP_OBJECT (AddBreakPointWindow, frame6, "frame6");
GLADE_HOOKUP_OBJECT (AddBreakPointWindow, alignment28, "alignment28");
GLADE_HOOKUP_OBJECT (AddBreakPointWindow, table6, "table6");
- GLADE_HOOKUP_OBJECT (AddBreakPointWindow, exceptionname, "exceptionname");
+ GLADE_HOOKUP_OBJECT (AddBreakPointWindow, bp_exceptionname, "bp_exceptionname");
GLADE_HOOKUP_OBJECT (AddBreakPointWindow, label51, "label51");
GLADE_HOOKUP_OBJECT (AddBreakPointWindow, label53, "label53");
GLADE_HOOKUP_OBJECT (AddBreakPointWindow, exception_label, "exception_label");
@@ -1302,17 +1301,17 @@ create_AddBreakPointWindow (void)
GLADE_HOOKUP_OBJECT (AddBreakPointWindow, alignment2, "alignment2");
GLADE_HOOKUP_OBJECT (AddBreakPointWindow, table8, "table8");
GLADE_HOOKUP_OBJECT (AddBreakPointWindow, vbox12, "vbox12");
- GLADE_HOOKUP_OBJECT (AddBreakPointWindow, hitcondition, "hitcondition");
+ GLADE_HOOKUP_OBJECT (AddBreakPointWindow, bp_hitcondition, "bp_hitcondition");
GLADE_HOOKUP_OBJECT (AddBreakPointWindow, radiobutton2, "radiobutton2");
GLADE_HOOKUP_OBJECT (AddBreakPointWindow, radiobutton3, "radiobutton3");
GLADE_HOOKUP_OBJECT (AddBreakPointWindow, radiobutton4, "radiobutton4");
GLADE_HOOKUP_OBJECT (AddBreakPointWindow, alignment30, "alignment30");
GLADE_HOOKUP_OBJECT (AddBreakPointWindow, label57, "label57");
- GLADE_HOOKUP_OBJECT (AddBreakPointWindow, hitvalue, "hitvalue");
- GLADE_HOOKUP_OBJECT (AddBreakPointWindow, temporary, "temporary");
+ GLADE_HOOKUP_OBJECT (AddBreakPointWindow, bp_hitvalue, "bp_hitvalue");
+ GLADE_HOOKUP_OBJECT (AddBreakPointWindow, bp_temporary, "bp_temporary");
GLADE_HOOKUP_OBJECT (AddBreakPointWindow, label58, "label58");
GLADE_HOOKUP_OBJECT (AddBreakPointWindow, label59, "label59");
- GLADE_HOOKUP_OBJECT (AddBreakPointWindow, enabled, "enabled");
+ GLADE_HOOKUP_OBJECT (AddBreakPointWindow, bp_enabled, "bp_enabled");
GLADE_HOOKUP_OBJECT (AddBreakPointWindow, label60, "label60");
GLADE_HOOKUP_OBJECT (AddBreakPointWindow, condition_frame_label, "condition_frame_label");
GLADE_HOOKUP_OBJECT (AddBreakPointWindow, alignment32, "alignment32");
View
24 src/main.c
@@ -20,10 +20,10 @@ GtkWidget *DebuggerSettingsWindow;
int main (int argc, char *argv[])
{
- GtkWidget *stack_view, *var_view;
+ GtkWidget *stack_view, *var_view, *breakpoint_view;
GtkCellRenderer *r1, *r2;
GtkTreeViewColumn *column1;
- GtkListStore *store, *var_store;
+ GtkListStore *store, *var_store, *breakpoint_store;
GtkTreeSortable *sortable;
GtkTreeSelection *selection;
GConfEngine *conf;
@@ -78,7 +78,6 @@ int main (int argc, char *argv[])
/* Setup the stack view store */
store = gtk_list_store_new(STACK_N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
- /* Add the columns for the stackview */
stack_view = lookup_widget(GTK_WIDGET(MainWindow), "stack_view");
gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(stack_view), -1, "#", r1, "text", STACK_NR_COLUMN, NULL);
@@ -91,6 +90,25 @@ int main (int argc, char *argv[])
gtk_tree_selection_set_select_function(selection, stack_selection_function, NULL, NULL);
+ /* Setup the breakpoint store */
+ breakpoint_store = gtk_list_store_new(
+ BREAKPOINT_N_COLUMNS,
+ G_TYPE_INT, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_STRING,
+ G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
+ G_TYPE_STRING, G_TYPE_INT, G_TYPE_INT, G_TYPE_BOOLEAN);
+
+ breakpoint_view = lookup_widget(GTK_WIDGET(MainWindow), "breakpoint_view");
+ gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(breakpoint_view), -1, "ID", r1, "text", BREAKPOINT_ID_COLUMN, NULL);
+ gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(breakpoint_view), -1, "Enabled?", r2, "text", BREAKPOINT_ENABLED_COLUMN, NULL);
+ gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(breakpoint_view), -1, "Type", r2, "text", BREAKPOINT_TYPE_COLUMN, NULL);
+ gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(breakpoint_view), -1, "What", r2, "text", BREAKPOINT_WHAT_COLUMN, NULL);
+ gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(breakpoint_view), -1, "Hit Cond.", r2, "text", BREAKPOINT_HIT_CONDITION_COLUMN, NULL);
+ gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(breakpoint_view), -1, "Hit Value", r2, "text", BREAKPOINT_HIT_VALUE_COLUMN, NULL);
+ gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(breakpoint_view), -1, "Hit Count", r2, "text", BREAKPOINT_HIT_COUNT_COLUMN, NULL);
+ gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(breakpoint_view), -1, "Temp.", r2, "text", BREAKPOINT_TEMPORARY_COLUMN, NULL);
+
+ gtk_tree_view_set_model(GTK_TREE_VIEW(breakpoint_view), GTK_TREE_MODEL(breakpoint_store));
+
/* Setup the variables view store */
var_store = gtk_tree_store_new(VARVIEW_N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_STRING, G_TYPE_STRING);

0 comments on commit 3443bc7

Please sign in to comment.
Something went wrong with that request. Please try again.