Permalink
Browse files

- Added the breakpoint store

- Added a proper icon.

SVN Rev: 2185
  • Loading branch information...
derickr committed Nov 29, 2006
1 parent 78c315f commit 3443bc7d3544d8e0f67847a91b34332a2a55db89
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
@@ -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
Binary file not shown.
View
@@ -4,13 +4,15 @@
#include <gtk/gtk.h>
#include <gconf/gconf.h>
+#include <string.h>
#include "callbacks.h"
#include "interface.h"
#include "support.h"
#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
@@ -71,6 +71,24 @@ enum
VARVIEW_N_COLUMNS
};
+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,
Oops, something went wrong.

0 comments on commit 3443bc7

Please sign in to comment.