Permalink
Browse files

- No clue what this changes :I

SVN Rev: 2268
  • Loading branch information...
1 parent 04f876a commit f40be48ebf0d5bd53453d7c56eecd867f648440b @derickr committed Feb 19, 2007
Showing with 44 additions and 33 deletions.
  1. +7 −12 gtkdbgp.glade
  2. +8 −15 src/interface.c
  3. +29 −6 src/server.c
View
@@ -510,10 +510,9 @@
</child>
<child>
- <widget class="GtkHBox" id="hbox10">
+ <widget class="GtkHPaned" id="hpaned1">
<property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
+ <property name="can_focus">True</property>
<child>
<widget class="GtkVBox" id="vbox10">
@@ -966,9 +965,8 @@
</child>
</widget>
<packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
+ <property name="shrink">True</property>
+ <property name="resize">False</property>
</packing>
</child>
@@ -981,7 +979,7 @@
<property name="yscale">1</property>
<property name="top_padding">0</property>
<property name="bottom_padding">0</property>
- <property name="left_padding">10</property>
+ <property name="left_padding">0</property>
<property name="right_padding">0</property>
<child>
@@ -1078,9 +1076,8 @@
</child>
</widget>
<packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
+ <property name="shrink">True</property>
+ <property name="resize">True</property>
</packing>
</child>
</widget>
@@ -2859,7 +2856,6 @@
<property name="use_font">False</property>
<property name="use_size">False</property>
<property name="focus_on_click">True</property>
- <signal name="font_set" handler="on_font_code_button_font_set" last_modification_time="Wed, 06 Dec 2006 00:41:14 GMT"/>
</widget>
<packing>
<property name="left_attach">1</property>
@@ -2881,7 +2877,6 @@
<property name="use_font">False</property>
<property name="use_size">False</property>
<property name="focus_on_click">True</property>
- <signal name="font_set" handler="on_font_var_button_font_set" last_modification_time="Wed, 06 Dec 2006 00:41:08 GMT"/>
</widget>
<packing>
<property name="left_attach">1</property>
View
@@ -77,7 +77,7 @@ create_MainWindow (void)
GtkWidget *kill_button;
GtkWidget *last_message_label;
GtkWidget *hseparator1;
- GtkWidget *hbox10;
+ GtkWidget *hpaned1;
GtkWidget *vbox10;
GtkWidget *code_notebook;
GtkWidget *scrolledwindow13;
@@ -405,15 +405,15 @@ create_MainWindow (void)
gtk_box_pack_start (GTK_BOX (vbox1), hseparator1, FALSE, TRUE, 1);
gtk_widget_set_size_request (hseparator1, -1, 2);
- hbox10 = gtk_hbox_new (FALSE, 0);
- gtk_widget_set_name (hbox10, "hbox10");
- gtk_widget_show (hbox10);
- gtk_box_pack_start (GTK_BOX (vbox1), hbox10, TRUE, TRUE, 0);
+ hpaned1 = gtk_hpaned_new ();
+ gtk_widget_set_name (hpaned1, "hpaned1");
+ gtk_widget_show (hpaned1);
+ gtk_box_pack_start (GTK_BOX (vbox1), hpaned1, TRUE, TRUE, 0);
vbox10 = gtk_vbox_new (FALSE, 0);
gtk_widget_set_name (vbox10, "vbox10");
gtk_widget_show (vbox10);
- gtk_box_pack_start (GTK_BOX (hbox10), vbox10, FALSE, TRUE, 0);
+ gtk_paned_pack1 (GTK_PANED (hpaned1), vbox10, FALSE, TRUE);
gtk_widget_set_size_request (vbox10, 650, -1);
code_notebook = gtk_notebook_new ();
@@ -581,8 +581,7 @@ create_MainWindow (void)
alignment20 = gtk_alignment_new (0.5, 0.5, 1, 1);
gtk_widget_set_name (alignment20, "alignment20");
gtk_widget_show (alignment20);
- gtk_box_pack_start (GTK_BOX (hbox10), alignment20, TRUE, TRUE, 0);
- gtk_alignment_set_padding (GTK_ALIGNMENT (alignment20), 0, 0, 10, 0);
+ gtk_paned_pack2 (GTK_PANED (hpaned1), alignment20, TRUE, TRUE);
viewport1 = gtk_viewport_new (NULL, NULL);
gtk_widget_set_name (viewport1, "viewport1");
@@ -742,7 +741,7 @@ create_MainWindow (void)
GLADE_HOOKUP_OBJECT (MainWindow, kill_button, "kill_button");
GLADE_HOOKUP_OBJECT (MainWindow, last_message_label, "last_message_label");
GLADE_HOOKUP_OBJECT (MainWindow, hseparator1, "hseparator1");
- GLADE_HOOKUP_OBJECT (MainWindow, hbox10, "hbox10");
+ GLADE_HOOKUP_OBJECT (MainWindow, hpaned1, "hpaned1");
GLADE_HOOKUP_OBJECT (MainWindow, vbox10, "vbox10");
GLADE_HOOKUP_OBJECT (MainWindow, code_notebook, "code_notebook");
GLADE_HOOKUP_OBJECT (MainWindow, scrolledwindow13, "scrolledwindow13");
@@ -1721,12 +1720,6 @@ create_DebuggerSettingsWindow (void)
GTK_WIDGET_SET_FLAGS (ok, GTK_CAN_DEFAULT);
gtk_button_set_relief (GTK_BUTTON (ok), GTK_RELIEF_NONE);
- g_signal_connect ((gpointer) font_code_button, "font_set",
- G_CALLBACK (on_font_code_button_font_set),
- NULL);
- g_signal_connect ((gpointer) font_var_button, "font_set",
- G_CALLBACK (on_font_var_button_font_set),
- NULL);
g_signal_connect ((gpointer) revert, "clicked",
G_CALLBACK (on_revert_clicked),
NULL);
View
@@ -168,9 +168,9 @@ int do_source_get(int param, ClientState* state)
int do_property_get(int param, ClientState* state)
{
if (param) {
- state->command = xdebug_sprintf( "property_get -i %d -n %s -p %d", get_next_id(state), state->property, param);
+ state->command = xdebug_sprintf( "property_get -i %d -n %s -d %d -p %d", get_next_id(state), state->property, state->last_selected_stack_frame, param);
} else {
- state->command = xdebug_sprintf( "property_get -i %d -n %s", get_next_id(state), state->property);
+ state->command = xdebug_sprintf( "property_get -i %d -n %s -d %d", get_next_id(state), state->property, state->last_selected_stack_frame);
}
xdfree(state->property);
return INTERACTIVE;
@@ -398,7 +398,7 @@ int process_select_file_line_for_selected_stack_no_check(int param, ClientState*
static void add_property(GtkTreeStore *store, GtkTreeIter *parent_iter, xdebug_xml_node *property)
{
xdebug_xml_attribute *fullname_attr, *name_attr, *type_attr, *size_attr, *encoding_attr, *class_attr, *facet_attr;
- xdebug_xml_attribute *children_attr, *numchildren_attr;
+ xdebug_xml_attribute *children_attr, *numchildren_attr, *page_attr;
gchar *value, *type, *name;
int new_len, max_children;
GtkTreeIter iter;
@@ -407,30 +407,51 @@ static void add_property(GtkTreeStore *store, GtkTreeIter *parent_iter, xdebug_x
GtkTreePath *path;
gchar *path_string;
int child_count, fetch_page;
- int offset = 0;
+ int offset = 0, hint = 0;
conf = gconf_engine_get_default();
max_children = gconf_engine_get_int(conf, "/apps/gtkdbgp/max_children", NULL);
children_attr = xdebug_xml_fetch_attribute(property, "children");
+ fullname_attr = xdebug_xml_fetch_attribute(property, "fullname");
numchildren_attr = xdebug_xml_fetch_attribute(property, "numchildren");
+ page_attr = xdebug_xml_fetch_attribute(property, "page");
+
+ if (fullname_attr) {
+ g_print( "\nRunning add_property for '%s'\n", fullname_attr->value);
+ }
if (children_attr && numchildren_attr && children_attr->value && strcmp(children_attr->value, "1") == 0) {
+ gtk_tree_model_get(store, parent_iter, VARVIEW_PAGES_FETCHED, &fetch_page, -1);
+ gtk_tree_model_get(store, parent_iter, VARVIEW_HIDDEN_HINT, &hint, -1);
+ g_print( "Got fetched pages: %d\n", fetch_page);
+ g_print( "Got hidden hint: %d\n", hint);
+
pages = strtol(numchildren_attr->value, NULL, 10);
pages = (pages + max_children - 1) / max_children;
- gtk_tree_model_get(store, parent_iter, VARVIEW_PAGES_FETCHED, &fetch_page, -1);
if ((fetch_page + 1) == pages) {
+ g_print( "Setting hint to 0\n");
gtk_tree_store_set(store, parent_iter,
VARVIEW_HIDDEN_HINT, 0,
-1);
}
+
+ g_print( "Setting page count to %d\n", pages);
gtk_tree_store_set(store, parent_iter,
- VARVIEW_PAGES_FETCHED, fetch_page + 1,
VARVIEW_PAGE_COUNT, pages,
-1);
+
+ if (page_attr) {
+ g_print( "Setting pages fetched to %d\n", fetch_page + 1);
+ gtk_tree_store_set(store, parent_iter,
+ VARVIEW_PAGES_FETCHED, fetch_page + 1,
+ -1);
+ }
+
offset = fetch_page * max_children;
}
if (!property->child && children_attr && children_attr->value && strcmp(children_attr->value, "1") == 0) {
+ g_print( "Setting hint to %d\n", DBGPCLIENT_FETCH_MORE);
gtk_tree_store_set(store, parent_iter,
VARVIEW_HIDDEN_HINT, DBGPCLIENT_FETCH_MORE,
-1);
@@ -755,6 +776,7 @@ gboolean varview_selection_function(GtkTreeSelection *selection, GtkTreeModel *m
g_print( "Need to fetch '%s'? The hint is '%d'\n", fullname, hint);
if (hint == DBGPCLIENT_FETCH_MORE) {
gtk_tree_store_set(model, &iter, VARVIEW_HIDDEN_HINT, 0, -1);
+ g_print( "Setting hint to 0\n");
client_state->server_state = SERVER_STATE_FETCH_PROPERTY;
client_state->action_list_ptr = fetch_property_action_list;
client_state->property = xdstrdup(fullname);
@@ -769,6 +791,7 @@ gboolean varview_selection_function(GtkTreeSelection *selection, GtkTreeModel *m
}
if (hint == DBGPCLIENT_FETCH_PAGES) {
gtk_tree_store_set(model, &iter, VARVIEW_HIDDEN_HINT, 0, -1);
+ g_print( "Setting hint to 0\n");
client_state->server_state = SERVER_STATE_FETCH_PROPERTY;
client_state->action_list_ptr = fetch_property_action_list;
client_state->property = xdstrdup(fullname);

0 comments on commit f40be48

Please sign in to comment.