anjuta r3430 - in trunk: . plugins/build-basic-autotools plugins/symbol-db
- From: jhs svn gnome org
- To: svn-commits-list gnome org
- Subject: anjuta r3430 - in trunk: . plugins/build-basic-autotools plugins/symbol-db
- Date: Mon, 7 Jan 2008 14:17:56 +0000 (GMT)
Author: jhs
Date: Mon Jan 7 14:17:56 2008
New Revision: 3430
URL: http://svn.gnome.org/viewvc/anjuta?rev=3430&view=rev
Log:
2008-01-06 Massimo Cora\' <maxcvs email it>
* plugins/symbol-db/plugin.c: (on_global_treeview_row_collapsed),
(value_removed_current_editor), (symbol_db_activate),
(symbol_db_deactivate):
* plugins/symbol-db/symbol-db-engine.c:
(symbol_db_engine_get_global_members_filtered):
* plugins/symbol-db/symbol-db-view.c:
(do_add_child_symbol_to_view), (prepare_for_adding),
(on_symbol_inserted), (sdb_view_row_expanded_idle_destroy),
(sdb_view_row_expanded_idle), (sdb_view_namespace_row_expanded),
(sdb_view_global_row_expanded), (sdb_view_vars_row_expanded),
(symbol_db_view_row_expanded), (symbol_db_view_row_collapsed),
(sdb_view_init), (sdb_view_finalize),
(sdb_view_build_and_display_base_tree):
* plugins/symbol-db/symbol-db-view.h:
added controls to expand Global tab nodes in a non-freezing way.
Fixed also some little bugs always on global-tab.
Modified:
trunk/ChangeLog
trunk/plugins/build-basic-autotools/anjuta-build-basic-autotools-plugin.glade
trunk/plugins/symbol-db/plugin.c
trunk/plugins/symbol-db/symbol-db-engine.c
trunk/plugins/symbol-db/symbol-db-view.c
trunk/plugins/symbol-db/symbol-db-view.h
Modified: trunk/ChangeLog
==============================================================================
--- trunk/ChangeLog (original)
+++ trunk/ChangeLog Mon Jan 7 14:17:56 2008
@@ -1,3 +1,24 @@
+2008-01-06 Massimo Cora' <maxcvs email it>
+
+ Reviewed by: Johannes Schmid <jhs gnome org>
+
+ * plugins/symbol-db/plugin.c: (on_global_treeview_row_collapsed),
+ (value_removed_current_editor), (symbol_db_activate),
+ (symbol_db_deactivate):
+ * plugins/symbol-db/symbol-db-engine.c:
+ (symbol_db_engine_get_global_members_filtered):
+ * plugins/symbol-db/symbol-db-view.c:
+ (do_add_child_symbol_to_view), (prepare_for_adding),
+ (on_symbol_inserted), (sdb_view_row_expanded_idle_destroy),
+ (sdb_view_row_expanded_idle), (sdb_view_namespace_row_expanded),
+ (sdb_view_global_row_expanded), (sdb_view_vars_row_expanded),
+ (symbol_db_view_row_expanded), (symbol_db_view_row_collapsed),
+ (sdb_view_init), (sdb_view_finalize),
+ (sdb_view_build_and_display_base_tree):
+ * plugins/symbol-db/symbol-db-view.h:
+ added controls to expand Global tab nodes in a non-freezing way.
+ Fixed also some little bugs always on global-tab.
+
2008-01-06 Naba Kumar <naba gnome org>
Patches from James Liggett:
Modified: trunk/plugins/build-basic-autotools/anjuta-build-basic-autotools-plugin.glade
==============================================================================
--- trunk/plugins/build-basic-autotools/anjuta-build-basic-autotools-plugin.glade (original)
+++ trunk/plugins/build-basic-autotools/anjuta-build-basic-autotools-plugin.glade Mon Jan 7 14:17:56 2008
@@ -1,533 +1,448 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--*- mode: xml -*-->
<glade-interface>
-
-<widget class="GtkDialog" id="execute_dialog">
- <property name="title" translatable="yes">Select execution program and args</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
- <property name="modal">False</property>
- <property name="default_width">400</property>
- <property name="default_height">300</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="focus_on_map">True</property>
- <property name="urgency_hint">False</property>
- <property name="has_separator">True</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox5">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">5</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area5">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="cancelbutton2">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">-6</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="okbutton3">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="can_focus">True</property>
- <property name="has_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">-5</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frame1">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
-
- <child>
- <widget class="GtkVBox" id="vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkScrolledWindow" id="treeview_frame">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTreeView" id="programs_treeview">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">True</property>
- <property name="rules_hint">False</property>
- <property name="reorderable">False</property>
- <property name="enable_search">True</property>
- <property name="fixed_height_mode">False</property>
- <property name="hover_selection">False</property>
- <property name="hover_expand">False</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox27">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label104">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Arguments: </property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xpad">5</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="program_arguments">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">â</property>
- <property name="activates_default">True</property>
- </widget>
- <packing>
- <property name="padding">5</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="program_run_in_terminal">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Run in terminal</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label105">
- <property name="visible">True</property>
- <property name="label" translatable="yes"><b>Program execution:</b></property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkWindow" id="preferences_dialog_build">
- <property name="title" translatable="yes">window1</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="focus_on_map">True</property>
- <property name="urgency_hint">False</property>
-
- <child>
- <widget class="GtkFrame" id="Build">
- <property name="border_width">10</property>
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">12</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkVBox" id="vbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkVBox" id="vbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkCheckButton" id="preferences_toggle:bool:0:0:indicators.automatic">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Highlight build message locations in editor</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox28">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkCheckButton" id="preferences_toggle:bool:0:0:build.install.root">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Install as root:</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="preferences_entry:text:sudo:0:build.install.root.command">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">â</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <placeholder/>
- </child>
-
- <child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="sb_frame">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment2">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">12</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkTable" id="table1">
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">0</property>
- <property name="column_spacing">0</property>
-
- <child>
- <widget class="GtkCheckButton" id="preferences_toggle:bool:0:0:build.use_scratchbox">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Use scratchbox</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="preferences_entry:text:/scratchbox:0:build.scratchbox.path">
- <property name="visible">True</property>
- <property name="editable">False</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">â</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Path:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">5</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes"><b>Scratchbox Options</b></property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">5</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label106">
- <property name="visible">True</property>
- <property name="label" translatable="yes"><b>Build</b></property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
+ <widget class="GtkDialog" id="execute_dialog">
+ <property name="title" translatable="yes">Select execution program and args</property>
+ <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+ <property name="default_width">400</property>
+ <property name="default_height">300</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox5">
+ <property name="visible">True</property>
+ <property name="spacing">5</property>
+ <child>
+ <widget class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="border_width">5</property>
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+ <child>
+ <widget class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkScrolledWindow" id="treeview_frame">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="border_width">5</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+ <child>
+ <widget class="GtkTreeView" id="programs_treeview">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox27">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkLabel" id="label104">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="xpad">5</property>
+ <property name="label" translatable="yes">Arguments: </property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkEntry" id="program_arguments">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="activates_default">True</property>
+ </widget>
+ <packing>
+ <property name="padding">5</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="program_run_in_terminal">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="border_width">5</property>
+ <property name="label" translatable="yes">Run in terminal</property>
+ <property name="use_underline">True</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label105">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes"><b>Program execution:</b></property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area5">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+ <child>
+ <widget class="GtkButton" id="cancelbutton2">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="label">gtk-cancel</property>
+ <property name="use_stock">True</property>
+ <property name="response_id">-6</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkButton" id="okbutton3">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="label">gtk-ok</property>
+ <property name="use_stock">True</property>
+ <property name="response_id">-5</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="GtkWindow" id="preferences_dialog_build">
+ <property name="title" translatable="yes">window1</property>
+ <child>
+ <widget class="GtkVBox" id="vbox2">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <child>
+ <widget class="GtkFrame" id="Build">
+ <property name="visible">True</property>
+ <property name="border_width">10</property>
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="left_padding">12</property>
+ <child>
+ <widget class="GtkVBox" id="vbox2">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkVBox" id="vbox3">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkCheckButton" id="preferences_toggle:bool:0:0:indicators.automatic">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="border_width">5</property>
+ <property name="label" translatable="yes">Highlight build message locations in editor</property>
+ <property name="use_underline">True</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox28">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkCheckButton" id="preferences_toggle:bool:0:0:build.install.root">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="border_width">5</property>
+ <property name="label" translatable="yes">Install as root:</property>
+ <property name="use_underline">True</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkEntry" id="preferences_entry:text:sudo:0:build.install.root.command">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox1">
+ <property name="visible">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkFrame" id="sb_frame">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="left_padding">12</property>
+ <child>
+ <widget class="GtkTable" id="table1">
+ <property name="visible">True</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">2</property>
+ <child>
+ <widget class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="xpad">5</property>
+ <property name="label" translatable="yes">Path:</property>
+ </widget>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options"></property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkEntry" id="preferences_entry:text:/scratchbox:0:build.scratchbox.path">
+ <property name="visible">True</property>
+ <property name="editable">False</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="preferences_toggle:bool:0:0:build.use_scratchbox">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Use scratchbox</property>
+ <property name="use_underline">True</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="right_attach">2</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>Scratchbox Options</b></property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">5</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label106">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes"><b>Build</b></property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkFrame" id="Build">
+ <property name="visible">True</property>
+ <property name="border_width">10</property>
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="left_padding">12</property>
+ <child>
+ <widget class="GtkVBox" id="vbox2">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkVBox" id="vbox3">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkCheckButton" id="preferences_toggle:bool:0:0:build.make.keepgoing">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="border_width">5</property>
+ <property name="label" translatable="yes">Keep going when some targets can't be made</property>
+ <property name="use_underline">True</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox2">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <child>
+ <widget class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label" translatable="yes">Number of job to allow: </property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">10</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkSpinButton" id="preferences_spin:text:sudo:0:build.make.process">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="max_length">2</property>
+ <property name="adjustment">1 1 100 1 10 10</property>
+ <property name="numeric">True</property>
+ <property name="update_policy">GTK_UPDATE_IF_VALID</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox1">
+ <property name="visible">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label106">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes"><b>Make options</b></property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
</glade-interface>
Modified: trunk/plugins/symbol-db/plugin.c
==============================================================================
--- trunk/plugins/symbol-db/plugin.c (original)
+++ trunk/plugins/symbol-db/plugin.c Mon Jan 7 14:17:56 2008
@@ -541,20 +541,16 @@
}
static void
-on_editor_foreach_clear (gpointer key, gpointer value, gpointer user_data)
+on_global_treeview_row_collapsed (GtkTreeView *tree_view,
+ GtkTreeIter *iter,
+ GtkTreePath *path,
+ SymbolDBPlugin *user_data)
{
- const gchar *uri;
+ DEBUG_PRINT ("on_global_treeview_row_collapsed ()");
+
+ symbol_db_view_row_collapsed (SYMBOL_DB_VIEW (user_data->dbv_view_tree),
+ user_data->sdbe, iter);
- uri = (const gchar *)value;
- if (uri && strlen (uri) > 0)
- {
-#if 0
- /* FIXME ?! */
- DEBUG_PRINT ("Removing file tags of %s", uri);
- anjuta_symbol_view_workspace_remove_file (ANJUTA_SYMBOL_VIEW (sv_plugin->sv_tree),
- uri);
-#endif
- }
}
static void
@@ -572,12 +568,6 @@
need_symbols_update = FALSE;
sdb_plugin = ANJUTA_PLUGIN_SYMBOL_DB (plugin);
-/* FIXME
- ui = anjuta_shell_get_ui (plugin->shell, NULL);
- action = anjuta_ui_get_action (ui, "ActionGroupSymbolNavigation",
- "ActionGotoSymbol");
- g_object_set (G_OBJECT (action), "sensitive", FALSE, NULL);
-*/
sdb_plugin->current_editor = NULL;
}
@@ -1066,6 +1056,9 @@
g_signal_connect (G_OBJECT (symbol_db->dbv_view_tree), "row-expanded",
G_CALLBACK (on_global_treeview_row_expanded), plugin);
+
+ g_signal_connect (G_OBJECT (symbol_db->dbv_view_tree), "row-collapsed",
+ G_CALLBACK (on_global_treeview_row_collapsed), plugin);
gtk_container_add (GTK_CONTAINER(symbol_db->scrolled_global),
symbol_db->dbv_view_tree);
@@ -1147,8 +1140,6 @@
{
g_hash_table_foreach (sdb_plugin->editor_connected,
on_editor_foreach_disconnect, plugin);
- g_hash_table_foreach (sdb_plugin->editor_connected,
- on_editor_foreach_clear, plugin);
g_hash_table_destroy (sdb_plugin->editor_connected);
sdb_plugin->editor_connected = NULL;
}
Modified: trunk/plugins/symbol-db/symbol-db-engine.c
==============================================================================
--- trunk/plugins/symbol-db/symbol-db-engine.c (original)
+++ trunk/plugins/symbol-db/symbol-db-engine.c Mon Jan 7 14:17:56 2008
@@ -5516,7 +5516,7 @@
"symbol.name, symbol.file_position, symbol.is_file_scope, "
"symbol.signature, sym_kind.kind_name %s FROM symbol "
"JOIN sym_kind ON symbol.kind_id = sym_kind.sym_kind_id %s "
- "WHERE symbol.scope_id <= 0 AND is_file_scope = 0 "
+ "WHERE symbol.scope_id <= 0 AND symbol.is_file_scope = 0 "
"%s %s %s", info_data->str, join_data->str,
group_by_option, limit, offset);
}
@@ -5555,7 +5555,7 @@
"symbol.file_position, "
"symbol.is_file_scope, symbol.signature, sym_kind.kind_name %s FROM symbol "
"%s JOIN sym_kind ON symbol.kind_id = sym_kind.sym_kind_id "
- "WHERE symbol.scope_id <= 0 AND is_file_scope = 0 "
+ "WHERE symbol.scope_id <= 0 AND symbol.is_file_scope = 0 "
"%s %s %s %s", info_data->str, join_data->str,
filter_str->str, group_by_option, limit, offset);
g_string_free (filter_str, FALSE);
Modified: trunk/plugins/symbol-db/symbol-db-view.c
==============================================================================
--- trunk/plugins/symbol-db/symbol-db-view.c (original)
+++ trunk/plugins/symbol-db/symbol-db-view.c Mon Jan 7 14:17:56 2008
@@ -55,6 +55,7 @@
GtkTreeRowReference *row_ref_global;
GTree *nodes_displayed;
GTree *waiting_for;
+ GTree *expanding_gfunc_ids;
};
typedef struct _WaitingForSymbol {
@@ -64,6 +65,16 @@
} WaitingForSymbol;
+typedef struct _NodeIdleExpand {
+ SymbolDBView *dbv;
+ SymbolDBEngineIterator *iterator;
+ SymbolDBEngine *dbe;
+ GtkTreePath *expanded_path;
+ gint expanded_symbol_id;
+
+} NodeIdleExpand;
+
+
static GtkTreeViewClass *parent_class = NULL;
static GHashTable *pixbufs_hash = NULL;
static void
@@ -188,7 +199,7 @@
}
}
-static GtkTreeRowReference *
+static inline GtkTreeRowReference *
do_add_root_symbol_to_view (SymbolDBView *dbv, const GdkPixbuf *pixbuf,
const gchar* symbol_name, gint symbol_id)
{
@@ -221,7 +232,11 @@
return row_ref;
}
-static GtkTreeRowReference *
+/* before calling this function be sure that parent_symbol_id is already into
+ * nodes_displayed GTree, or this will complain about it and will bail out
+ * with a warning.
+ */
+static inline GtkTreeRowReference *
do_add_child_symbol_to_view (SymbolDBView *dbv, gint parent_symbol_id,
const GdkPixbuf *pixbuf, const gchar* symbol_name,
gint symbol_id)
@@ -232,8 +247,6 @@
GtkTreeIter iter, child_iter;
GtkTreeRowReference *row_ref;
- g_return_val_if_fail (dbv != NULL, NULL);
-
priv = dbv->priv;
store = GTK_TREE_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (dbv)));
@@ -513,8 +526,8 @@
if (curr_tree_row_ref == NULL)
{
g_warning ("prepare_for_adding (): row_ref == NULL. symbol_name %s "
- "symbol_id %d kind %s [-ROOT_GLOBAL %d] parent_symbol_id %d",
- symbol_name, symbol_id, kind, -ROOT_GLOBAL, parent_symbol_id);
+ "symbol_id %d kind %s parent_symbol_id %d",
+ symbol_name, symbol_id, kind, parent_symbol_id);
return;
}
@@ -592,14 +605,14 @@
priv = dbv->priv;
- DEBUG_PRINT ("on_symbol_inserted -global- %d", symbol_id);
+ /*DEBUG_PRINT ("on_symbol_inserted -global- %d", symbol_id);*/
store = GTK_TREE_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (dbv)));
parent_symbol_id = symbol_db_engine_get_parent_scope_id_by_symbol_id (dbe,
symbol_id,
NULL);
- DEBUG_PRINT ("on_symbol_inserted parent_symbol_id detected %d", parent_symbol_id);
+ /*DEBUG_PRINT ("on_symbol_inserted parent_symbol_id detected %d", parent_symbol_id);*/
/* get the original symbol infos */
iterator = symbol_db_engine_get_symbol_info_by_id (dbe, symbol_id,
@@ -623,8 +636,8 @@
*/
if (symbol_db_engine_iterator_node_get_symbol_is_file_scope (iter_node) == TRUE)
{
- DEBUG_PRINT ("on_symbol_inserted() -global- symbol %d is not global scope",
- symbol_id);
+/* DEBUG_PRINT ("on_symbol_inserted() -global- symbol %d is not global scope",
+ symbol_id);*/
g_object_unref (iterator);
return;
}
@@ -803,28 +816,166 @@
}
static void
+sdb_view_row_expanded_idle_destroy (gpointer data)
+{
+ NodeIdleExpand *node_expand;
+ SymbolDBView *dbv;
+ SymbolDBEngine *dbe;
+ SymbolDBEngineIterator *iterator;
+
+ g_return_if_fail (data != NULL);
+ node_expand = data;
+ DEBUG_PRINT ("sdb_view_global_row_expanded_idle_destroy ()");
+ dbv = node_expand->dbv;
+ dbe = node_expand->dbe;
+
+ /* remove from the GTree the ids of the func expanding */
+ g_tree_remove (dbv->priv->expanding_gfunc_ids,
+ (gpointer)node_expand->expanded_symbol_id);
+
+ if (node_expand->expanded_path != NULL) {
+ gtk_tree_path_free (node_expand->expanded_path);
+ node_expand->expanded_path = NULL;
+ }
+ g_object_unref (node_expand->iterator);
+ node_expand->iterator = NULL;
+ g_free (node_expand);
+}
+
+static gboolean
+sdb_view_row_expanded_idle (gpointer data)
+{
+ NodeIdleExpand *node_expand;
+ SymbolDBView *dbv;
+ SymbolDBEngine *dbe;
+ SymbolDBEngineIterator *iterator;
+ const GdkPixbuf *pixbuf;
+ const gchar* symbol_name;
+ const gchar* symbol_kind;
+ const gchar* symbol_access;
+ GtkTreeIter iter;
+ gint curr_symbol_id;
+ SymbolDBEngineIteratorNode *iter_node;
+ gpointer node;
+ GtkTreeRowReference *curr_tree_row_ref;
+ SymbolDBViewPriv *priv;
+
+ node_expand = data;
+
+ dbv = node_expand->dbv;
+ iterator = node_expand->iterator;
+ dbe = node_expand->dbe;
+ priv = dbv->priv;
+
+ if (iterator == NULL)
+ return FALSE;
+
+ iter_node = SYMBOL_DB_ENGINE_ITERATOR_NODE (iterator);
+ curr_symbol_id = symbol_db_engine_iterator_node_get_symbol_id (iter_node);
+ node = g_tree_lookup (priv->nodes_displayed, (gpointer)curr_symbol_id);
+
+ if (node != NULL)
+ {
+ /* already displayed */
+ return symbol_db_engine_iterator_move_next (iterator);
+ }
+
+ symbol_name = symbol_db_engine_iterator_node_get_symbol_name (iter_node);
+ symbol_kind = symbol_db_engine_iterator_node_get_symbol_extra_string (iter_node,
+ SYMINFO_KIND);
+ symbol_access = symbol_db_engine_iterator_node_get_symbol_extra_string (iter_node,
+ SYMINFO_ACCESS);
+ pixbuf = symbol_db_view_get_pixbuf (symbol_kind, symbol_access);
+
+ curr_tree_row_ref = do_add_child_symbol_to_view (dbv,
+ node_expand->expanded_symbol_id, pixbuf,
+ symbol_name, curr_symbol_id);
+ if (curr_tree_row_ref == NULL)
+ {
+ g_warning ("sdb_view_global_row_expanded (): row_ref == NULL");
+ return symbol_db_engine_iterator_move_next (iterator);
+ }
+
+ /* we'll fake the gpointer to store an int */
+ g_tree_insert (priv->nodes_displayed, (gpointer)curr_symbol_id,
+ curr_tree_row_ref);
+
+ sdb_view_get_iter_from_row_ref (dbv, curr_tree_row_ref, &iter);
+
+ /* check for children about this node... */
+ sdb_view_do_add_hidden_dummy_child (dbv, dbe, &iter, curr_symbol_id,
+ FALSE);
+
+ if (node_expand->expanded_path != NULL)
+ {
+ gtk_tree_view_expand_row (GTK_TREE_VIEW (dbv),
+ node_expand->expanded_path,
+ FALSE);
+ gtk_tree_path_free (node_expand->expanded_path);
+ node_expand->expanded_path = NULL;
+ }
+
+ if (symbol_db_engine_iterator_move_next (iterator) == TRUE)
+ {
+ return TRUE;
+ }
+ else {
+ if (g_tree_lookup (priv->nodes_displayed,
+ (gpointer)-node_expand->expanded_symbol_id) == NULL)
+ {
+ GtkTreeRowReference *others_row_ref;
+ GtkTreeIter others_dummy_node;
+ others_row_ref = do_add_child_symbol_to_view (dbv,
+ node_expand->expanded_symbol_id,
+ symbol_db_view_get_pixbuf ("vars", "others"),
+ "Vars/Others",
+ -node_expand->expanded_symbol_id);
+
+ /* insert a negative node ... */
+ g_tree_insert (priv->nodes_displayed,
+ (gpointer)-node_expand->expanded_symbol_id,
+ others_row_ref);
+
+ /* ... and a dummy child */
+ sdb_view_get_iter_from_row_ref (dbv, others_row_ref, &others_dummy_node);
+
+ sdb_view_do_add_hidden_dummy_child (dbv, dbe, &others_dummy_node, 0,
+ TRUE);
+ }
+
+ return FALSE;
+ }
+}
+
+static void
sdb_view_namespace_row_expanded (SymbolDBView *dbv, SymbolDBEngine *dbe,
GtkTreeIter *expanded_iter, gint expanded_symbol_id)
{
SymbolDBViewPriv *priv;
SymbolDBEngineIterator *iterator;
- GtkTreePath *path;
GtkTreeStore *store;
- GtkTreeIter others_dummy_node;
- GtkTreeRowReference *others_row_ref;
-
+ GPtrArray *filter_array;
+ gpointer node;
+
g_return_if_fail (dbv != NULL);
priv = dbv->priv;
store = GTK_TREE_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (dbv)));
DEBUG_PRINT ("sdb_view_namespace_row_expanded ");
- GPtrArray *array;
+
+ /* check if there's another expanding idle_func running */
+ node = g_tree_lookup (priv->expanding_gfunc_ids, (gpointer)expanded_symbol_id);
+ if (node != NULL)
+ {
+ return;
+ }
- array = g_ptr_array_new ();
- g_ptr_array_add (array, "class");
- g_ptr_array_add (array, "struct");
+ filter_array = g_ptr_array_new ();
+ g_ptr_array_add (filter_array, "class");
+ g_ptr_array_add (filter_array, "struct");
+ /* get results from database */
iterator = symbol_db_engine_get_scope_members_by_symbol_id_filtered (dbe,
expanded_symbol_id,
-1,
@@ -832,110 +983,40 @@
SYMINFO_SIMPLE|
SYMINFO_KIND|
SYMINFO_ACCESS,
- array,
+ filter_array,
TRUE
);
- g_ptr_array_free (array, TRUE);
+ g_ptr_array_free (filter_array, TRUE);
if (iterator != NULL)
{
- do {
- gint curr_symbol_id;
- SymbolDBEngineIteratorNode *iter_node;
- const GdkPixbuf *pixbuf;
- const gchar* symbol_name;
- GtkTreeIter child_iter;
- GtkTreePath *path;
- GtkTreeRowReference *child_row_ref;
- gpointer node;
-
- iter_node = SYMBOL_DB_ENGINE_ITERATOR_NODE (iterator);
-
- curr_symbol_id = symbol_db_engine_iterator_node_get_symbol_id (iter_node);
-
- /* Step 2:
- * check if the curr_symbol_id is already displayed. In that case
- * skip to the next symbol
- */
- node = g_tree_lookup (priv->nodes_displayed, (gpointer)curr_symbol_id);
+ NodeIdleExpand *node_expand;
+ gint idle_id;
- if (node != NULL)
- {
- continue;
- }
-
- /* Step 3 */
- /* ok we must display this symbol */
- pixbuf = symbol_db_view_get_pixbuf (
- symbol_db_engine_iterator_node_get_symbol_extra_string (
- iter_node, SYMINFO_KIND),
- symbol_db_engine_iterator_node_get_symbol_extra_string (
- iter_node, SYMINFO_ACCESS));
-
- symbol_name = symbol_db_engine_iterator_node_get_symbol_name (iter_node);
-
- gtk_tree_store_append (store, &child_iter, expanded_iter);
-
- gtk_tree_store_set (store, &child_iter,
- COLUMN_PIXBUF, pixbuf,
- COLUMN_NAME, symbol_name,
- COLUMN_SYMBOL_ID, curr_symbol_id,
- -1);
-
- path = gtk_tree_model_get_path (gtk_tree_view_get_model (GTK_TREE_VIEW (dbv)),
- &child_iter);
- child_row_ref = gtk_tree_row_reference_new (
- gtk_tree_view_get_model (GTK_TREE_VIEW (dbv)), path);
- gtk_tree_path_free (path);
-
- /* insert the just append row_ref into the GTree for a quick retrieval
- * later
- */
- g_tree_insert (priv->nodes_displayed, (gpointer)curr_symbol_id,
- child_row_ref);
+ node_expand = g_new0 (NodeIdleExpand, 1);
- /* good. Let's check now for a child (B) of the just appended child (A).
- * Adding B (a dummy one for now) to A will make A expandable
- */
- sdb_view_do_add_hidden_dummy_child (dbv, dbe, &child_iter, curr_symbol_id,
- FALSE);
- } while (symbol_db_engine_iterator_move_next (iterator) == TRUE);
-
- g_object_unref (iterator);
- }
-
-
- /* add the 'Vars/Others node */
- if (g_tree_lookup (priv->nodes_displayed, (gpointer)-expanded_symbol_id) == NULL)
- {
- gtk_tree_store_append (store, &others_dummy_node, expanded_iter);
- gtk_tree_store_set (store, &others_dummy_node,
- COLUMN_PIXBUF, symbol_db_view_get_pixbuf ("vars", "others"),
- COLUMN_NAME, "Vars/Others",
- COLUMN_SYMBOL_ID, -expanded_symbol_id, /* please note the negative */
- -1);
- path = gtk_tree_model_get_path (gtk_tree_view_get_model (GTK_TREE_VIEW (dbv)),
- &others_dummy_node);
- others_row_ref = gtk_tree_row_reference_new (
- gtk_tree_view_get_model (GTK_TREE_VIEW (dbv)), path);
- gtk_tree_path_free (path);
-
- /* insert a negative node ... */
- g_tree_insert (priv->nodes_displayed, (gpointer)-expanded_symbol_id,
- others_row_ref);
+ node_expand->dbv = dbv;
+ node_expand->iterator = iterator;
+ node_expand->dbe = dbe;
+ node_expand->expanded_path =
+ gtk_tree_model_get_path (gtk_tree_view_get_model (GTK_TREE_VIEW (dbv)),
+ expanded_iter);
+ node_expand->expanded_symbol_id = expanded_symbol_id;
- /* ... and a dummy child */
- sdb_view_do_add_hidden_dummy_child (dbv, dbe, &others_dummy_node, 0, TRUE);
+ /* be sure that the expanding process doesn't freeze the gui */
+ idle_id = g_idle_add_full (G_PRIORITY_LOW,
+ (GSourceFunc) sdb_view_row_expanded_idle,
+ (gpointer) node_expand,
+ (GDestroyNotify) sdb_view_row_expanded_idle_destroy);
+
+ /* insert the idle_id into a g_tree */
+ g_tree_insert (priv->expanding_gfunc_ids, (gpointer)expanded_symbol_id,
+ (gpointer)idle_id);
}
-
- /* force expand it */
- path = gtk_tree_model_get_path (gtk_tree_view_get_model (GTK_TREE_VIEW (dbv)),
- expanded_iter);
- gtk_tree_view_expand_row (GTK_TREE_VIEW (dbv), path, FALSE);
- gtk_tree_path_free (path);
}
+
static void
sdb_view_global_row_expanded (SymbolDBView *dbv, SymbolDBEngine *dbe,
GtkTreeIter *expanded_iter, gint expanded_symbol_id)
@@ -944,10 +1025,7 @@
SymbolDBViewPriv *priv;
SymbolDBEngineIterator *iterator;
GPtrArray *filter_array;
- GtkTreePath *path;
- GtkTreeIter others_dummy_node;
- GtkTreeRowReference *others_row_ref;
-
+ gpointer node;
g_return_if_fail (dbv != NULL);
priv = dbv->priv;
@@ -957,6 +1035,15 @@
filter_array = g_ptr_array_new ();
g_ptr_array_add (filter_array, "class");
g_ptr_array_add (filter_array, "struct");
+
+ DEBUG_PRINT ("sdb_view_global_row_expanded ()");
+
+ /* check if there's another expanding idle_func running */
+ node = g_tree_lookup (priv->expanding_gfunc_ids, (gpointer)expanded_symbol_id);
+ if (node != NULL)
+ {
+ return;
+ }
/* check for the presence of namespaces.
* If that's the case then populate the root with a 'Global' node.
@@ -972,86 +1059,30 @@
if (iterator != NULL)
{
- do {
- gint curr_symbol_id;
- SymbolDBEngineIteratorNode *iter_node;
- gpointer node;
- const GdkPixbuf *pixbuf;
- const gchar* symbol_name;
- const gchar* symbol_kind;
- const gchar* symbol_access;
- GtkTreeRowReference *curr_tree_row_ref;
-
- iter_node = SYMBOL_DB_ENGINE_ITERATOR_NODE (iterator);
-
- curr_symbol_id = symbol_db_engine_iterator_node_get_symbol_id (iter_node);
-
- node = g_tree_lookup (priv->nodes_displayed, (gpointer)curr_symbol_id);
+ NodeIdleExpand *node_expand;
+ gint idle_id;
- if (node != NULL)
- {
- /* already displayed */
- continue;
- }
-
- symbol_kind = symbol_db_engine_iterator_node_get_symbol_extra_string (
- iter_node, SYMINFO_KIND);
-
- symbol_access = symbol_db_engine_iterator_node_get_symbol_extra_string (
- iter_node, SYMINFO_ACCESS);
-
-
- pixbuf = symbol_db_view_get_pixbuf (symbol_kind, symbol_access);
-
- symbol_name = symbol_db_engine_iterator_node_get_symbol_name (iter_node);
-
- curr_tree_row_ref = do_add_child_symbol_to_view (dbv, ROOT_GLOBAL, pixbuf,
- symbol_name, curr_symbol_id);
- if (curr_tree_row_ref == NULL)
- {
- g_warning ("sdb_view_global_row_expanded (): row_ref == NULL");
- continue;
- }
-
- /* we'll fake the gpointer to store an int */
- g_tree_insert (priv->nodes_displayed, (gpointer)curr_symbol_id,
- curr_tree_row_ref);
- } while (symbol_db_engine_iterator_move_next (iterator) == TRUE);
+ node_expand = g_new0 (NodeIdleExpand, 1);
- g_object_unref (iterator);
+ node_expand->dbv = dbv;
+ node_expand->iterator = iterator;
+ node_expand->dbe = dbe;
+ node_expand->expanded_path = gtk_tree_model_get_path (
+ gtk_tree_view_get_model (GTK_TREE_VIEW (dbv)),
+ expanded_iter);
+ node_expand->expanded_symbol_id = expanded_symbol_id;
+
+ idle_id = g_idle_add_full (G_PRIORITY_LOW,
+ (GSourceFunc) sdb_view_row_expanded_idle,
+ (gpointer) node_expand,
+ (GDestroyNotify) sdb_view_row_expanded_idle_destroy);
+
+ /* insert the idle_id into a g_tree */
+ DEBUG_PRINT ("Inserting into g_tree expanded_symbol_id %d and idle_id %d",
+ expanded_symbol_id, idle_id);
+ g_tree_insert (priv->expanding_gfunc_ids, (gpointer)expanded_symbol_id,
+ (gpointer)idle_id);
}
-
-
-
- /* add the 'Vars/Others node */
- if (g_tree_lookup (priv->nodes_displayed, (gpointer)-expanded_symbol_id) == NULL)
- {
- gtk_tree_store_append (store, &others_dummy_node, expanded_iter);
- gtk_tree_store_set (store, &others_dummy_node,
- COLUMN_PIXBUF, symbol_db_view_get_pixbuf ("vars", "others"),
- COLUMN_NAME, "Vars/Others",
- COLUMN_SYMBOL_ID, -expanded_symbol_id, /* please note the negative */
- -1);
- path = gtk_tree_model_get_path (gtk_tree_view_get_model (GTK_TREE_VIEW (dbv)),
- &others_dummy_node);
- others_row_ref = gtk_tree_row_reference_new (
- gtk_tree_view_get_model (GTK_TREE_VIEW (dbv)), path);
- gtk_tree_path_free (path);
-
- /* insert a negative node ... */
- g_tree_insert (priv->nodes_displayed, (gpointer)-expanded_symbol_id,
- others_row_ref);
-
- /* ... and a dummy child */
- sdb_view_do_add_hidden_dummy_child (dbv, dbe, &others_dummy_node, 0,
- TRUE);
- }
-
- /* force expand it */
- path = gtk_tree_model_get_path (gtk_tree_view_get_model (GTK_TREE_VIEW (dbv)),
- expanded_iter);
- gtk_tree_view_expand_row (GTK_TREE_VIEW (dbv), path, FALSE);
- gtk_tree_path_free (path);
}
static void
@@ -1060,12 +1091,10 @@
{
SymbolDBViewPriv *priv;
SymbolDBEngineIterator *iterator;
- GtkTreePath *path;
GtkTreeStore *store;
- GPtrArray *filter_array;
-
- gint positive_symbol_expanded;
-
+ GPtrArray *filter_array;
+ gint positive_symbol_expanded;
+ gpointer node;
g_return_if_fail (dbv != NULL);
priv = dbv->priv;
@@ -1074,6 +1103,13 @@
store = GTK_TREE_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (dbv)));
DEBUG_PRINT ("sdb_view_vars_row_expanded ()");
+
+ /* check if there's another expanding idle_func running */
+ node = g_tree_lookup (priv->expanding_gfunc_ids, (gpointer)expanded_symbol_id);
+ if (node != NULL)
+ {
+ return;
+ }
filter_array = g_ptr_array_new ();
g_ptr_array_add (filter_array, "class");
@@ -1107,81 +1143,31 @@
g_ptr_array_free (filter_array, TRUE);
if (iterator != NULL)
- {
- do {
- gint curr_symbol_id;
- SymbolDBEngineIteratorNode *iter_node;
- const GdkPixbuf *pixbuf;
- const gchar* symbol_name;
- GtkTreeIter child_iter;
- GtkTreePath *path;
- GtkTreeRowReference *child_row_ref;
- gpointer node;
-
- iter_node = SYMBOL_DB_ENGINE_ITERATOR_NODE (iterator);
-
- curr_symbol_id = symbol_db_engine_iterator_node_get_symbol_id (iter_node);
-
- /* Step 2:
- * check if the curr_symbol_id is already displayed. In that case
- * skip to the next symbol
- */
- node = g_tree_lookup (priv->nodes_displayed, (gpointer)curr_symbol_id);
-
- if (node != NULL)
- {
- continue;
- }
-
- /* Step 3 */
- /* ok we must display this symbol */
- pixbuf = symbol_db_view_get_pixbuf (
- symbol_db_engine_iterator_node_get_symbol_extra_string (
- iter_node, SYMINFO_KIND),
- symbol_db_engine_iterator_node_get_symbol_extra_string (
- iter_node, SYMINFO_ACCESS));
-
- symbol_name = symbol_db_engine_iterator_node_get_symbol_name (iter_node);
-
- gtk_tree_store_append (store, &child_iter, expanded_iter);
-
- gtk_tree_store_set (store, &child_iter,
- COLUMN_PIXBUF, pixbuf,
- COLUMN_NAME, symbol_name,
- COLUMN_SYMBOL_ID, curr_symbol_id,
- -1);
-
- path = gtk_tree_model_get_path (gtk_tree_view_get_model (GTK_TREE_VIEW (dbv)),
- &child_iter);
- child_row_ref = gtk_tree_row_reference_new (
- gtk_tree_view_get_model (GTK_TREE_VIEW (dbv)), path);
- gtk_tree_path_free (path);
-
- /* insert the just append row_ref into the GTree for a quick retrieval
- * later
- */
- g_tree_insert (priv->nodes_displayed, (gpointer)curr_symbol_id,
- child_row_ref);
-
- /* good. Let's check now for a child (B) of the just appended child (A).
- * Adding B (a dummy one for now) to A will make A expandable
- */
- sdb_view_do_add_hidden_dummy_child (dbv, dbe, &child_iter, curr_symbol_id,
- FALSE);
-
- } while (symbol_db_engine_iterator_move_next (iterator) == TRUE);
+ {
+ NodeIdleExpand *node_expand;
+ gint idle_id;
+
+ node_expand = g_new0 (NodeIdleExpand, 1);
+
+ node_expand->dbv = dbv;
+ node_expand->iterator = iterator;
+ node_expand->dbe = dbe;
+ node_expand->expanded_path = gtk_tree_model_get_path (
+ gtk_tree_view_get_model (GTK_TREE_VIEW (dbv)),
+ expanded_iter);
+ node_expand->expanded_symbol_id = expanded_symbol_id;
- g_object_unref (iterator);
+ idle_id = g_idle_add_full (G_PRIORITY_LOW,
+ (GSourceFunc) sdb_view_row_expanded_idle,
+ (gpointer) node_expand,
+ (GDestroyNotify) sdb_view_row_expanded_idle_destroy);
+
+ /* insert the idle_id into a g_tree */
+ g_tree_insert (priv->expanding_gfunc_ids, (gpointer)expanded_symbol_id,
+ (gpointer)idle_id);
}
-
- /* force expand it */
- path = gtk_tree_model_get_path (gtk_tree_view_get_model (GTK_TREE_VIEW (dbv)),
- expanded_iter);
- gtk_tree_view_expand_row (GTK_TREE_VIEW (dbv), path, FALSE);
- gtk_tree_path_free (path);
}
-
/**
* Usually on a row expanded event we should perform the following steps:
* 1. retrieve a list of scoped children.
@@ -1199,7 +1185,7 @@
SymbolDBViewPriv *priv;
SymbolDBEngineIterator *iterator;
GtkTreePath *path;
-
+
g_return_if_fail (dbv != NULL);
priv = dbv->priv;
@@ -1221,7 +1207,6 @@
if (dummy_symbol == DUMMY_SYMBOL_ID)
gtk_tree_store_remove (store, &child);
}
-
/* Ok. Is the expanded node a 'namespace' one? A 'global' one? Or a
* 'vars/etc' one? parse here the cases and if we're not there
@@ -1354,6 +1339,39 @@
gtk_tree_path_free (path);
}
+void
+symbol_db_view_row_collapsed (SymbolDBView *dbv, SymbolDBEngine *dbe,
+ GtkTreeIter *collapsed_iter)
+{
+ GtkTreeStore *store;
+ gint collapsed_symbol_id;
+ SymbolDBViewPriv *priv;
+ gpointer node;
+
+ g_return_if_fail (dbv != NULL);
+ priv = dbv->priv;
+
+ store = GTK_TREE_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (dbv)));
+
+ gtk_tree_model_get (GTK_TREE_MODEL (store), collapsed_iter,
+ COLUMN_SYMBOL_ID, &collapsed_symbol_id, -1);
+
+ /* do a quick check to see if the collapsed_symbol_id is listed into the
+ * currently expanding symbols. If that's the case remove the gsource func.
+ */
+ node = g_tree_lookup (priv->expanding_gfunc_ids, (gpointer)collapsed_symbol_id);
+
+ if (node == NULL)
+ {
+ /* no expanding gfunc found. */
+ return;
+ }
+ else {
+ g_source_remove ((gint)node);
+ g_tree_remove (priv->expanding_gfunc_ids, (gpointer)collapsed_symbol_id);
+ }
+}
+
static GtkTreeStore *
sdb_view_locals_create_new_store ()
{
@@ -1389,6 +1407,12 @@
priv->remove_handler = 0;
priv->scan_end_handler = 0;
+ /* create a GTree where to store the row_expanding ids of the gfuncs.
+ * we would be able then to g_source_remove them on row_collapsed
+ */
+ priv->expanding_gfunc_ids = g_tree_new_full ((GCompareDataFunc)>ree_compare_func,
+ NULL, NULL, NULL);
+
/* Tree and his model */
store = NULL;
@@ -1433,6 +1457,9 @@
symbol_db_view_clear_cache (view);
+ if (priv->expanding_gfunc_ids)
+ g_tree_destroy (priv->expanding_gfunc_ids);
+
g_free (priv);
/* dbe must be freed outside. */
@@ -1742,22 +1769,7 @@
"row_ref");
return;
}
- /*
- global_path = gtk_tree_row_reference_get_path (global_tree_row_ref);
- if (global_path == NULL)
- {
- g_warning ("sdb_view_build_and_display_base_tree (): something went wrong.");
- return;
- }
-
- if (gtk_tree_model_get_iter (gtk_tree_view_get_model (GTK_TREE_VIEW (dbv)),
- &global_child_iter, global_path) == FALSE)
- {
- g_warning ("sdb_view_build_and_display_base_tree (): cannot insert Global node");
- return;
- }
- gtk_tree_path_free (global_path);
- */
+
/* add a dummy child */
sdb_view_do_add_hidden_dummy_child (dbv, dbe,
&global_child_iter, ROOT_GLOBAL, TRUE);
Modified: trunk/plugins/symbol-db/symbol-db-view.h
==============================================================================
--- trunk/plugins/symbol-db/symbol-db-view.h (original)
+++ trunk/plugins/symbol-db/symbol-db-view.h Mon Jan 7 14:17:56 2008
@@ -70,7 +70,11 @@
void
symbol_db_view_row_expanded (SymbolDBView *dbv, SymbolDBEngine *dbe,
- GtkTreeIter *iter);
+ GtkTreeIter *expanded_iter);
+
+void
+symbol_db_view_row_collapsed (SymbolDBView *dbv, SymbolDBEngine *dbe,
+ GtkTreeIter *expanded_iter);
gboolean
symbol_db_view_get_file_and_line (SymbolDBView *dbv, SymbolDBEngine *dbe,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]