[anjuta] Update tools plugin



commit 3a6d81267eb24053851e9ce4324ebe7d1608ba10
Author: Sébastien Granjoux <seb sfo free fr>
Date:   Mon Jul 6 22:53:25 2009 +0200

    Update tools plugin
    
    Fix not working tools combo box (due to switch to GtkBuilder)
    Add a atp_ prefix on all global functions
    Fix icon selector
    Use new anjuta_util_builder functions

 plugins/tools/anjuta-tools.ui |  216 +++++++++++++++++++++++++---------------
 plugins/tools/dialog.c        |   54 +++++-----
 plugins/tools/editor.c        |  223 +++++++++++++++++++++++++----------------
 3 files changed, 301 insertions(+), 192 deletions(-)
---
diff --git a/plugins/tools/anjuta-tools.ui b/plugins/tools/anjuta-tools.ui
index cff936e..615b518 100644
--- a/plugins/tools/anjuta-tools.ui
+++ b/plugins/tools/anjuta-tools.ui
@@ -1,6 +1,7 @@
 <?xml version="1.0"?>
-<!--Generated with glade3 3.4.2 on Mon Mar 31 15:12:40 2008 -->
 <interface>
+  <requires lib="gtk+" version="2.16"/>
+  <!-- interface-naming-policy toplevel-contextual -->
   <object class="GtkWindow" id="list_tools">
     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
     <child>
@@ -8,7 +9,7 @@
         <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_xalign">0</property>
-        <property name="shadow_type">GTK_SHADOW_NONE</property>
+        <property name="shadow_type">none</property>
         <child>
           <object class="GtkAlignment" id="alignment1">
             <property name="visible">True</property>
@@ -23,19 +24,21 @@
                     <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="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                    <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                    <property name="shadow_type">GTK_SHADOW_IN</property>
+                    <property name="hscrollbar_policy">automatic</property>
+                    <property name="vscrollbar_policy">automatic</property>
+                    <property name="shadow_type">in</property>
                     <child>
                       <object class="GtkTreeView" id="tools_treeview">
                         <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 | GDK_STRUCTURE_MASK</property>
-                        <property name="headers_clickable">True</property>
-                        <signal handler="on_tool_activated" name="row_activated"/>
+                        <signal name="row_activated" handler="atp_on_tool_activated"/>
                       </object>
                     </child>
                   </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
                 </child>
                 <child>
                   <object class="GtkVButtonBox" id="vbuttonbox1">
@@ -43,71 +46,84 @@
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                     <property name="border_width">5</property>
                     <property name="spacing">5</property>
-                    <property name="layout_style">GTK_BUTTONBOX_START</property>
+                    <property name="layout_style">start</property>
                     <child>
                       <object class="GtkButton" id="edit_bt">
+                        <property name="label">gtk-edit</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">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">gtk-edit</property>
                         <property name="use_stock">True</property>
-                        <signal handler="on_tool_edit" name="clicked"/>
+                        <signal name="clicked" handler="atp_on_tool_edit"/>
                       </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
                     </child>
                     <child>
                       <object class="GtkButton" id="add_bt">
+                        <property name="label">gtk-new</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">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">gtk-new</property>
                         <property name="use_stock">True</property>
-                        <signal handler="on_tool_add" name="clicked"/>
+                        <signal name="clicked" handler="atp_on_tool_add"/>
                       </object>
                       <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
                     <child>
                       <object class="GtkButton" id="delete_bt">
+                        <property name="label">gtk-clear</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">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">gtk-clear</property>
                         <property name="use_stock">True</property>
-                        <signal handler="on_tool_delete" name="clicked"/>
+                        <signal name="clicked" handler="atp_on_tool_delete"/>
                       </object>
                       <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
                         <property name="position">2</property>
                       </packing>
                     </child>
                     <child>
                       <object class="GtkButton" id="up_bt">
+                        <property name="label">gtk-go-up</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">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">gtk-go-up</property>
                         <property name="use_stock">True</property>
-                        <signal handler="on_tool_up" name="clicked"/>
+                        <signal name="clicked" handler="atp_on_tool_up"/>
                       </object>
                       <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
                         <property name="position">3</property>
                       </packing>
                     </child>
                     <child>
                       <object class="GtkButton" id="down_bt">
+                        <property name="label">gtk-go-down</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">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">gtk-go-down</property>
                         <property name="use_stock">True</property>
-                        <signal handler="on_tool_down" name="clicked"/>
+                        <signal name="clicked" handler="atp_on_tool_down"/>
                       </object>
                       <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
                         <property name="position">4</property>
                       </packing>
                     </child>
@@ -135,9 +151,9 @@
   <object class="GtkDialog" id="editor_dialog">
     <property name="title" translatable="yes">Tool Editor</property>
     <property name="destroy_with_parent">True</property>
-    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <property name="type_hint">dialog</property>
     <property name="skip_pager_hint">True</property>
-    <signal handler="on_editor_dialog_response" name="response"/>
+    <signal name="response" handler="atp_on_editor_dialog_response"/>
     <child internal-child="vbox">
       <object class="GtkVBox" id="dialog-vbox3">
         <property name="visible">True</property>
@@ -150,15 +166,6 @@
             <property name="column_spacing">5</property>
             <property name="row_spacing">5</property>
             <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
               <object class="GtkLabel" id="label45">
                 <property name="visible">True</property>
                 <property name="xalign">0</property>
@@ -166,26 +173,26 @@
               </object>
               <packing>
                 <property name="x_options">GTK_FILL</property>
-                <property name="y_options"/>
+                <property name="y_options"></property>
               </packing>
             </child>
             <child>
               <object class="GtkEntry" id="name_entry">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="invisible_char">*</property>
               </object>
               <packing>
                 <property name="left_attach">1</property>
                 <property name="right_attach">2</property>
-                <property name="y_options"/>
+                <property name="y_options"></property>
               </packing>
             </child>
             <child>
               <object class="GtkCheckButton" id="enable_checkbox">
+                <property name="label" translatable="yes">Enabled</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="label" translatable="yes">Enabled</property>
+                <property name="receives_default">False</property>
                 <property name="use_underline">True</property>
                 <property name="draw_indicator">True</property>
               </object>
@@ -193,14 +200,15 @@
                 <property name="top_attach">5</property>
                 <property name="bottom_attach">6</property>
                 <property name="x_options">GTK_FILL</property>
-                <property name="y_options"/>
+                <property name="y_options"></property>
               </packing>
             </child>
             <child>
               <object class="GtkCheckButton" id="save_checkbox">
+                <property name="label" translatable="yes">Save all files</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="label" translatable="yes">Save all files</property>
+                <property name="receives_default">False</property>
                 <property name="use_underline">True</property>
                 <property name="draw_indicator">True</property>
               </object>
@@ -210,17 +218,18 @@
                 <property name="top_attach">5</property>
                 <property name="bottom_attach">6</property>
                 <property name="x_options">GTK_FILL</property>
-                <property name="y_options"/>
+                <property name="y_options"></property>
               </packing>
             </child>
             <child>
               <object class="GtkCheckButton" id="terminal_checkbox">
+                <property name="label" translatable="yes">Run in terminal</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="label" translatable="yes">Run in terminal</property>
+                <property name="receives_default">False</property>
                 <property name="use_underline">True</property>
                 <property name="draw_indicator">True</property>
-                <signal handler="on_editor_terminal_toggle" name="toggled"/>
+                <signal name="toggled" handler="atp_on_editor_terminal_toggle"/>
               </object>
               <packing>
                 <property name="left_attach">2</property>
@@ -228,7 +237,7 @@
                 <property name="top_attach">5</property>
                 <property name="bottom_attach">6</property>
                 <property name="x_options">GTK_FILL</property>
-                <property name="y_options"/>
+                <property name="y_options"></property>
               </packing>
             </child>
             <child>
@@ -239,10 +248,10 @@
                     <property name="visible">True</property>
                     <child>
                       <object class="GtkEntry" id="directory_entry">
+                        <property name="width_request">260</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="invisible_char">&#x25CF;</property>
-                        <property name="width_request">260</property>
                       </object>
                       <packing>
                         <property name="position">0</property>
@@ -254,6 +263,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">True</property>
+                        <signal name="clicked" handler="atp_on_editor_browse_button_dir_clicked"/>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -261,14 +271,18 @@
                       </packing>
                     </child>
                   </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
                 </child>
                 <child>
                   <object class="GtkButton" id="button22">
+                    <property name="label" translatable="yes">_Variable...</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="label" translatable="yes">_Variable...</property>
+                    <property name="receives_default">False</property>
                     <property name="use_underline">True</property>
-                    <signal handler="on_editor_dir_variable_show" name="clicked"/>
+                    <signal name="clicked" handler="atp_on_editor_dir_variable_show"/>
                   </object>
                   <packing>
                     <property name="expand">False</property>
@@ -296,7 +310,7 @@
                 <property name="top_attach">4</property>
                 <property name="bottom_attach">5</property>
                 <property name="x_options">GTK_FILL</property>
-                <property name="y_options"/>
+                <property name="y_options"></property>
               </packing>
             </child>
             <child>
@@ -306,16 +320,19 @@
                   <object class="GtkEntry" id="parameter_entry">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="invisible_char">*</property>
                   </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
                 </child>
                 <child>
                   <object class="GtkButton" id="button20">
+                    <property name="label" translatable="yes">_Variable...</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="label" translatable="yes">_Variable...</property>
+                    <property name="receives_default">False</property>
                     <property name="use_underline">True</property>
-                    <signal handler="on_editor_param_variable_show" name="clicked"/>
+                    <signal name="clicked" handler="atp_on_editor_param_variable_show"/>
                   </object>
                   <packing>
                     <property name="expand">False</property>
@@ -343,7 +360,7 @@
                 <property name="top_attach">3</property>
                 <property name="bottom_attach">4</property>
                 <property name="x_options">GTK_FILL</property>
-                <property name="y_options"/>
+                <property name="y_options"></property>
               </packing>
             </child>
             <child>
@@ -356,7 +373,7 @@
                 <property name="top_attach">2</property>
                 <property name="bottom_attach">3</property>
                 <property name="x_options">GTK_FILL</property>
-                <property name="y_options"/>
+                <property name="y_options"></property>
               </packing>
             </child>
             <child>
@@ -369,16 +386,17 @@
                 <property name="top_attach">1</property>
                 <property name="bottom_attach">2</property>
                 <property name="x_options">GTK_FILL</property>
-                <property name="y_options"/>
+                <property name="y_options"></property>
               </packing>
             </child>
             <child>
               <object class="GtkToggleButton" id="shortcut_bt">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
                 <property name="use_underline">True</property>
                 <property name="focus_on_click">False</property>
-                <signal handler="on_editor_shortcut_toggle" name="toggled"/>
+                <signal name="toggled" handler="atp_on_editor_shortcut_toggle"/>
               </object>
               <packing>
                 <property name="left_attach">1</property>
@@ -386,14 +404,15 @@
                 <property name="top_attach">1</property>
                 <property name="bottom_attach">2</property>
                 <property name="x_options">GTK_FILL</property>
-                <property name="y_options"/>
+                <property name="y_options"></property>
               </packing>
             </child>
             <child>
               <object class="GtkButton" id="icon_entry">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <signal handler="on_editor_icon_entry_clicked" name="clicked"/>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="atp_on_editor_icon_entry_clicked"/>
               </object>
               <packing>
                 <property name="left_attach">3</property>
@@ -407,13 +426,13 @@
               <object class="GtkLabel" id="label103">
                 <property name="visible">True</property>
                 <property name="xalign">0</property>
-                <property comments="This is the standard Unis stdout, see http://en.wikipedia.org/wiki/Standard_streams"; name="label" translatable="yes">Standard output:</property>
+                <property name="label" translatable="yes" comments="This is the standard Unis stdout, see http://en.wikipedia.org/wiki/Standard_streams";>Standard output:</property>
               </object>
               <packing>
                 <property name="top_attach">7</property>
                 <property name="bottom_attach">8</property>
                 <property name="x_options">GTK_FILL</property>
-                <property name="y_options"/>
+                <property name="y_options"></property>
               </packing>
             </child>
             <child>
@@ -433,7 +452,7 @@
               <object class="GtkLabel" id="label104">
                 <property name="visible">True</property>
                 <property name="xalign">0</property>
-                <property comments="This is the Unix stderr, see http://en.wikipedia.org/wiki/Standard_streams"; name="label" translatable="yes">Standard error:</property>
+                <property name="label" translatable="yes" comments="This is the Unix stderr, see http://en.wikipedia.org/wiki/Standard_streams";>Standard error:</property>
               </object>
               <packing>
                 <property name="left_attach">2</property>
@@ -441,7 +460,7 @@
                 <property name="top_attach">7</property>
                 <property name="bottom_attach">8</property>
                 <property name="x_options">GTK_FILL</property>
-                <property name="y_options"/>
+                <property name="y_options"></property>
               </packing>
             </child>
             <child>
@@ -461,19 +480,19 @@
               <object class="GtkLabel" id="label106">
                 <property name="visible">True</property>
                 <property name="xalign">0</property>
-                <property comments="This is the Unix stdin. See http://en.wikipedia.org/wiki/Standard_streams"; name="label" translatable="yes">Standard input:</property>
+                <property name="label" translatable="yes" comments="This is the Unix stdin. See http://en.wikipedia.org/wiki/Standard_streams";>Standard input:</property>
               </object>
               <packing>
                 <property name="top_attach">6</property>
                 <property name="bottom_attach">7</property>
                 <property name="x_options">GTK_FILL</property>
-                <property name="y_options"/>
+                <property name="y_options"></property>
               </packing>
             </child>
             <child>
               <object class="GtkComboBox" id="input_combo">
                 <property name="visible">True</property>
-                <signal handler="on_editor_input_changed" name="changed"/>
+                <signal name="changed" handler="atp_on_editor_input_changed"/>
               </object>
               <packing>
                 <property name="left_attach">1</property>
@@ -491,16 +510,19 @@
                   <object class="GtkEntry" id="input_entry">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="invisible_char">*</property>
                   </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
                 </child>
                 <child>
                   <object class="GtkButton" id="input_button">
+                    <property name="label" translatable="yes">_Variable...</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="label" translatable="yes">_Variable...</property>
+                    <property name="receives_default">False</property>
                     <property name="use_underline">True</property>
-                    <signal handler="on_editor_input_variable_show" name="clicked"/>
+                    <signal name="clicked" handler="atp_on_editor_input_variable_show"/>
                   </object>
                   <packing>
                     <property name="expand">False</property>
@@ -526,10 +548,10 @@
                     <property name="visible">True</property>
                     <child>
                       <object class="GtkEntry" id="command_entry">
+                        <property name="width_request">260</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="invisible_char">&#x25CF;</property>
-                        <property name="width_request">260</property>
                       </object>
                       <packing>
                         <property name="position">0</property>
@@ -541,6 +563,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">True</property>
+                        <signal name="clicked" handler="atp_on_editor_browse_button_clicked"/>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -548,16 +571,20 @@
                       </packing>
                     </child>
                   </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
                 </child>
                 <child>
                   <object class="GtkCheckButton" id="script_checkbox">
+                    <property name="label" translatable="yes">Edit as script</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="tooltip-text" translatable="yes">Edit command as script in Anjuta on close</property>
-                    <property name="label" translatable="yes">Edit as script</property>
+                    <property name="receives_default">False</property>
+                    <property name="tooltip_text" translatable="yes">Edit command as script in Anjuta on close</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
-                    <signal handler="on_editor_script_toggle" name="toggled"/>
+                    <signal name="toggled" handler="atp_on_editor_script_toggle"/>
                   </object>
                   <packing>
                     <property name="expand">False</property>
@@ -575,6 +602,15 @@
                 <property name="y_options">GTK_FILL</property>
               </packing>
             </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
           </object>
           <packing>
             <property name="position">2</property>
@@ -583,32 +619,42 @@
         <child internal-child="action_area">
           <object class="GtkHButtonBox" id="dialog-action_area3">
             <property name="visible">True</property>
-            <property name="layout_style">GTK_BUTTONBOX_END</property>
+            <property name="layout_style">end</property>
             <child>
               <object class="GtkButton" id="cancelbutton1">
+                <property name="label">gtk-cancel</property>
                 <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="receives_default">False</property>
                 <property name="use_stock">True</property>
               </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
             </child>
             <child>
               <object class="GtkButton" id="okbutton2">
+                <property name="label">gtk-ok</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
-                <property name="label">gtk-ok</property>
+                <property name="receives_default">False</property>
                 <property name="use_stock">True</property>
               </object>
               <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
                 <property name="position">1</property>
               </packing>
             </child>
           </object>
           <packing>
             <property name="expand">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
           </packing>
         </child>
       </object>
@@ -624,9 +670,9 @@
     <property name="title" translatable="yes">Variable list</property>
     <property name="modal">True</property>
     <property name="destroy_with_parent">True</property>
-    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <property name="type_hint">dialog</property>
     <property name="skip_pager_hint">True</property>
-    <signal handler="on_variable_dialog_response" name="response"/>
+    <signal name="response" handler="atp_on_variable_dialog_response"/>
     <child internal-child="vbox">
       <object class="GtkVBox" id="dialog-vbox5">
         <property name="visible">True</property>
@@ -634,14 +680,14 @@
           <object class="GtkScrolledWindow" id="scrolledwindow17">
             <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="hscrollbar_policy">automatic</property>
+            <property name="vscrollbar_policy">automatic</property>
+            <property name="shadow_type">in</property>
             <child>
               <object class="GtkTreeView" id="variable_treeview">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <signal handler="on_variable_activate_row" name="row_activated"/>
+                <signal name="row_activated" handler="atp_on_variable_activate_row"/>
               </object>
             </child>
           </object>
@@ -652,32 +698,42 @@
         <child internal-child="action_area">
           <object class="GtkHButtonBox" id="dialog-action_area5">
             <property name="visible">True</property>
-            <property name="layout_style">GTK_BUTTONBOX_END</property>
+            <property name="layout_style">end</property>
             <child>
               <object class="GtkButton" id="closebutton1">
+                <property name="label">gtk-close</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
-                <property name="label">gtk-close</property>
+                <property name="receives_default">False</property>
                 <property name="use_stock">True</property>
               </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
             </child>
             <child>
               <object class="GtkButton" id="button17">
+                <property name="label">gtk-add</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
-                <property name="label">gtk-add</property>
+                <property name="receives_default">False</property>
                 <property name="use_stock">True</property>
               </object>
               <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
                 <property name="position">1</property>
               </packing>
             </child>
           </object>
           <packing>
             <property name="expand">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
           </packing>
         </child>
       </object>
diff --git a/plugins/tools/dialog.c b/plugins/tools/dialog.c
index 94659f0..bbc7e88 100644
--- a/plugins/tools/dialog.c
+++ b/plugins/tools/dialog.c
@@ -33,7 +33,7 @@
 
 /*---------------------------------------------------------------------------*/
 
-/* Widget and signal name found in glade file
+/* Widget and signal name found in gtk builder file
  *---------------------------------------------------------------------------*/
 
 #define TOOL_LIST "list_tools"
@@ -43,12 +43,13 @@
 #define TOOL_UP_BUTTON "up_bt"
 #define TOOL_DOWN_BUTTON "down_bt"
 
-void on_tool_add (GtkButton *button, gpointer user_data);
-void on_tool_activated (GtkTreeView  *treeview, GtkTreePath *path, GtkTreeViewColumn *col, gpointer user_data);
-void on_tool_edit (GtkButton *button, gpointer user_data);
-void on_tool_delete (GtkButton *button, gpointer user_data);
-void on_tool_up (GtkButton *button, gpointer user_data);
-void on_tool_down (GtkButton *button, gpointer user_data);
+/* Gtk builder callbacks */
+void atp_on_tool_add (GtkButton *button, gpointer user_data);
+void atp_on_tool_activated (GtkTreeView  *treeview, GtkTreePath *path, GtkTreeViewColumn *col, gpointer user_data);
+void atp_on_tool_edit (GtkButton *button, gpointer user_data);
+void atp_on_tool_delete (GtkButton *button, gpointer user_data);
+void atp_on_tool_up (GtkButton *button, gpointer user_data);
+void atp_on_tool_down (GtkButton *button, gpointer user_data);
 
 /* column of the list view */
 enum {
@@ -124,7 +125,7 @@ get_current_writable_tool (ATPToolDialog *this)
  *---------------------------------------------------------------------------*/
 
 void
-on_tool_add (GtkButton *button, gpointer user_data)
+atp_on_tool_add (GtkButton *button, gpointer user_data)
 {
 	ATPToolDialog *this = (ATPToolDialog *)user_data;
 	ATPUserTool *tool;
@@ -148,7 +149,7 @@ on_tool_add (GtkButton *button, gpointer user_data)
 }
 
 void
-on_tool_edit (GtkButton *button, gpointer user_data)
+atp_on_tool_edit (GtkButton *button, gpointer user_data)
 {
 	ATPToolDialog *this = (ATPToolDialog *)user_data;
 	ATPUserTool *tool;
@@ -165,7 +166,7 @@ on_tool_edit (GtkButton *button, gpointer user_data)
 }
 
 void
-on_tool_delete (GtkButton *button, gpointer user_data)
+atp_on_tool_delete (GtkButton *button, gpointer user_data)
 {
 	ATPToolDialog *this = (ATPToolDialog *)user_data;
 	ATPUserTool *tool;
@@ -182,7 +183,7 @@ on_tool_delete (GtkButton *button, gpointer user_data)
 }
 
 void
-on_tool_up (GtkButton *button, gpointer user_data)
+atp_on_tool_up (GtkButton *button, gpointer user_data)
 {
 	ATPToolDialog *this = (ATPToolDialog *)user_data;
 	ATPUserTool *tool;
@@ -206,7 +207,7 @@ on_tool_up (GtkButton *button, gpointer user_data)
 }
 
 void
-on_tool_down (GtkButton *button, gpointer user_data)
+atp_on_tool_down (GtkButton *button, gpointer user_data)
 {
 	ATPToolDialog *this = (ATPToolDialog *)user_data;
 	ATPUserTool *tool;
@@ -224,6 +225,12 @@ on_tool_down (GtkButton *button, gpointer user_data)
 	}
 }
 
+void
+atp_on_tool_activated (GtkTreeView  *treeview, GtkTreePath *path, GtkTreeViewColumn *col, gpointer user_data)
+{
+	atp_on_tool_edit (NULL, user_data);
+}
+
 static void
 on_tool_enable (GtkCellRendererToggle *cell_renderer, const gchar *path, gpointer user_data)
 {
@@ -243,12 +250,6 @@ on_tool_enable (GtkCellRendererToggle *cell_renderer, const gchar *path, gpointe
 	}	
 }
 
-void
-on_tool_activated (GtkTreeView  *treeview, GtkTreePath *path, GtkTreeViewColumn *col, gpointer user_data)
-{
-	on_tool_edit (NULL, user_data);
-}
-
 static void
 on_tool_selection_changed (GtkTreeSelection *selection, gpointer user_data)
 {
@@ -316,11 +317,18 @@ atp_tool_dialog_show (ATPToolDialog* this, GtkBuilder *bxml)
 	GtkTreeViewColumn *column;
 	GtkTreeSelection *selection;
 
-	this->dialog = GTK_WINDOW (gtk_builder_get_object (bxml, TOOL_LIST));
+	/* Get widgets */
+	anjuta_util_builder_get_objects (bxml,
+	    TOOL_LIST, &this->dialog,
+	    TOOL_TREEVIEW, &this->view,
+	    TOOL_EDIT_BUTTON, &this->edit_bt, 
+	    TOOL_DELETE_BUTTON, &this->delete_bt,
+	    TOOL_UP_BUTTON, &this->up_bt,
+	    TOOL_DOWN_BUTTON, &	this->down_bt,
+	    NULL);
 	gtk_window_set_transient_for (GTK_WINDOW (this->dialog), atp_plugin_get_app_window (this->plugin));
 
 	/* Create tree view */	
-	this->view = GTK_TREE_VIEW (gtk_builder_get_object (bxml, TOOL_TREEVIEW));
 	model = GTK_TREE_MODEL (gtk_list_store_new (ATP_N_TOOLS_COLUMNS,
 		G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_POINTER));
 	gtk_tree_view_set_model (this->view, model);
@@ -337,12 +345,6 @@ atp_tool_dialog_show (ATPToolDialog* this, GtkBuilder *bxml)
 	gtk_tree_view_append_column (this->view, column);
 	g_object_unref (model);
 
-	/* Get all buttons */
-	this->edit_bt = GTK_WIDGET (gtk_builder_get_object (bxml, TOOL_EDIT_BUTTON));
-	this->delete_bt = GTK_WIDGET (gtk_builder_get_object (bxml, TOOL_DELETE_BUTTON));
-	this->up_bt = GTK_WIDGET (gtk_builder_get_object (bxml, TOOL_UP_BUTTON));
-	this->down_bt = GTK_WIDGET (gtk_builder_get_object (bxml, TOOL_DOWN_BUTTON));
-
 	/* Connect all signals */
 	gtk_builder_connect_signals (bxml, this);
 	selection = gtk_tree_view_get_selection (this->view);
diff --git a/plugins/tools/editor.c b/plugins/tools/editor.c
index ecbee5e..9bf3134 100644
--- a/plugins/tools/editor.c
+++ b/plugins/tools/editor.c
@@ -126,17 +126,20 @@ struct _ATPToolEditor
 #define TOOL_VARIABLE "variable_dialog"
 #define VARIABLE_TREEVIEW "variable_treeview"
 
-void on_variable_activate_row (GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data);
-void on_variable_dialog_response (GtkDialog *dialog, gint response, gpointer user_data);
-void on_editor_icon_entry_clicked (GtkButton *button, gpointer user_data);
-void on_editor_terminal_toggle (GtkToggleButton *tb, gpointer user_data);
-void on_editor_script_toggle (GtkToggleButton *tb, gpointer user_data);
-void on_editor_input_changed (GtkComboBox *combo, gpointer user_data);
-void on_editor_dialog_response (GtkDialog *dialog, gint response, gpointer user_data);
-void on_editor_param_variable_show (GtkButton *button, gpointer user_data);
-void on_editor_dir_variable_show (GtkButton *button, gpointer user_data);
-void on_editor_input_variable_show (GtkButton *button, gpointer user_data);
-void on_editor_shortcut_toggle (GtkToggleButton *tb, gpointer user_data);
+void atp_on_variable_activate_row (GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data);
+void atp_on_variable_dialog_response (GtkDialog *dialog, gint response, gpointer user_data);
+void atp_on_editor_icon_entry_clicked (GtkButton *button, gpointer user_data);
+void atp_on_editor_terminal_toggle (GtkToggleButton *tb, gpointer user_data);
+void atp_on_editor_script_toggle (GtkToggleButton *tb, gpointer user_data);
+void atp_on_editor_input_changed (GtkComboBox *combo, gpointer user_data);
+void atp_on_editor_dialog_response (GtkDialog *dialog, gint response, gpointer user_data);
+void atp_on_editor_param_variable_show (GtkButton *button, gpointer user_data);
+void atp_on_editor_dir_variable_show (GtkButton *button, gpointer user_data);
+void atp_on_editor_input_variable_show (GtkButton *button, gpointer user_data);
+void atp_on_editor_shortcut_toggle (GtkToggleButton *tb, gpointer user_data);
+void atp_on_editor_browse_button_clicked (GtkButton *button, GtkEntry *entry);
+void atp_on_editor_browse_button_dir_clicked (GtkButton *button, GtkEntry *entry);
+
 
 /* Add helper function
  *---------------------------------------------------------------------------*/
@@ -190,6 +193,7 @@ static void
 set_combo_box_enum_model (GtkComboBox* combo_box, const ATPEnumType* list)
 {
 	GtkTreeModel *model;
+	GtkCellRenderer * renderer;
 
 	model = GTK_TREE_MODEL (gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_INT));
 
@@ -201,6 +205,10 @@ set_combo_box_enum_model (GtkComboBox* combo_box, const ATPEnumType* list)
 		gtk_list_store_set (GTK_LIST_STORE(model), &iter, 0, _(list->name), 1, list->id, -1);
 	}
 	gtk_combo_box_set_model (combo_box, model);
+	renderer = gtk_cell_renderer_text_new();
+	gtk_cell_layout_clear (GTK_CELL_LAYOUT(combo_box));
+    gtk_cell_layout_pack_start (GTK_CELL_LAYOUT(combo_box), renderer, TRUE);
+    gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT(combo_box), renderer, "text", 0 );
 }
 
 static gint
@@ -391,7 +399,7 @@ get_current_name (GtkTreeView *view)
 }
 
 void
-on_variable_activate_row (GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data)
+atp_on_variable_activate_row (GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data)
 {
 	ATPVariableDialog *this = (ATPVariableDialog*)user_data;
 	GtkTreeIter iter;
@@ -409,7 +417,7 @@ on_variable_activate_row (GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewC
 }
 
 void
-on_variable_dialog_response (GtkDialog *dialog, gint response, gpointer user_data)
+atp_on_variable_dialog_response (GtkDialog *dialog, gint response, gpointer user_data)
 {
 	ATPVariableDialog *this = (ATPVariableDialog *)user_data;
 	gchar* name;
@@ -430,11 +438,10 @@ on_variable_dialog_response (GtkDialog *dialog, gint response, gpointer user_dat
 static gboolean
 atp_variable_dialog_show (ATPVariableDialog* this, ATPFlags flag)
 {
-	GtkBuilder *bxml = gtk_builder_new ();
+	GtkBuilder *bxml;
 	GtkTreeModel *model;
 	GtkCellRenderer *renderer;
 	GtkTreeViewColumn *column;
-	GError* error = NULL;
 
 	if (this->dialog != NULL)
 	{
@@ -443,19 +450,17 @@ atp_variable_dialog_show (ATPVariableDialog* this, ATPFlags flag)
 		return TRUE;
 	}
 
-	if (!gtk_builder_add_from_file (bxml, GLADE_FILE, &error))
-	{
-		g_warning ("Couldn't load builder file: %s", error->message);
-		g_error_free (error);
-		anjuta_util_dialog_error (GTK_WINDOW (this->editor->dialog), _("Unable to build user interface for tool variable"));
-		return FALSE;
-	}
-	this->dialog = GTK_DIALOG (gtk_builder_get_object (bxml, TOOL_VARIABLE));
+	bxml = anjuta_util_builder_new (GLADE_FILE, NULL);
+	if (!bxml) return FALSE;
+	anjuta_util_builder_get_objects (bxml,
+	    TOOL_VARIABLE, &this->dialog,
+	    VARIABLE_TREEVIEW, &this->view,
+	    NULL);
+	
 	gtk_widget_show (GTK_WIDGET (this->dialog));
 	gtk_window_set_transient_for (GTK_WINDOW (this->dialog), GTK_WINDOW (this->editor->dialog));
 
 	/* Create variable list */
-	this->view = GTK_TREE_VIEW (gtk_builder_get_object (bxml, VARIABLE_TREEVIEW));
 	model = GTK_TREE_MODEL (gtk_list_store_new (ATP_N_VARIABLE_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING));
 	gtk_tree_view_set_model (this->view, model);
 
@@ -483,28 +488,77 @@ atp_variable_dialog_show (ATPVariableDialog* this, ATPFlags flag)
 /* Tool editor dialog
  *---------------------------------------------------------------------------*/
 
+static void
+cb_preview_update (GtkFileChooser *fc,
+		   GtkImage *preview)
+{
+	char *filename;
+	GdkPixbuf *pixbuf;
+
+	filename = gtk_file_chooser_get_preview_filename (fc);
+	if (filename) {
+		pixbuf = gdk_pixbuf_new_from_file (filename, NULL);
+
+		gtk_file_chooser_set_preview_widget_active (fc, pixbuf != NULL);
+		
+		if (pixbuf) {
+			gtk_image_set_from_pixbuf (preview, pixbuf);
+			g_object_unref (pixbuf);
+		}
+		
+		g_free (filename);
+	}
+}
+
 void
-on_editor_icon_entry_clicked (GtkButton *button, gpointer user_data)
+atp_on_editor_icon_entry_clicked (GtkButton *button, gpointer user_data)
 {
 	ATPToolEditor *this = (ATPToolEditor *)user_data;
 	GtkWidget *dialog;
-	dialog = gtk_file_chooser_dialog_new ("Open File",
-								NULL,
-								GTK_FILE_CHOOSER_ACTION_OPEN,
-								GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-								GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
-								NULL);
-	if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
-	{
-		char *filename;
-		GtkWidget* image;
-
-		filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
-		image = gtk_image_new_from_file (filename);
-		gtk_button_set_image (button, image);
+	GtkFileFilter *filter;
+	GtkWidget *preview;
+	int res;
+
+	dialog = gtk_file_chooser_dialog_new (_("Select an Image File"),
+											NULL,
+					      					GTK_FILE_CHOOSER_ACTION_OPEN, 
+					      					GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+					      					GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
+					      					NULL);
+	gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog),
+	    									PACKAGE_PIXMAPS_DIR);
+	filter = gtk_file_filter_new ();
+	gtk_file_filter_add_pixbuf_formats (filter);
+	gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (dialog), filter);
+
+	preview = gtk_image_new ();
+	gtk_file_chooser_set_preview_widget (GTK_FILE_CHOOSER (dialog),
+	    								    preview);
+	g_signal_connect (dialog, "update-preview",
+			  								G_CALLBACK (cb_preview_update), preview);
+
+	res = gtk_dialog_run (GTK_DIALOG (dialog));
+
+	if (res == GTK_RESPONSE_ACCEPT) {
+    	gchar *filename;
+
+    	filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
+		if (filename != NULL)
+		{
+			GtkWidget* image;
+			image = gtk_image_new_from_file (filename);
+			gtk_button_set_image (button, image);
+			gtk_button_set_label (button, NULL);
+		}
+		else
+		{
+			gtk_button_set_image (button, NULL);
+			gtk_button_set_label (button, _("Choose Icon"));
+		}
 		atp_user_tool_set_icon (this->tool, filename);
 		g_free (filename);
 	}
+
 	gtk_widget_destroy (dialog);
 }
 
@@ -641,11 +695,17 @@ atp_populate_tool_editor(ATPToolEditor* this)
 		GtkWidget* image;
 		image = gtk_image_new_from_file (atp_user_tool_get_icon (this->tool));
 		gtk_button_set_image (this->icon_en, image);
+		gtk_button_set_label (this->icon_en, NULL);
+	}
+	else
+	{
+		gtk_button_set_image (this->icon_en, NULL);
+		gtk_button_set_label (this->icon_en, _("Choose Icon"));
 	}
 }
 
 void
-on_editor_terminal_toggle (GtkToggleButton *tb, gpointer user_data)
+atp_on_editor_terminal_toggle (GtkToggleButton *tb, gpointer user_data)
 {
 	ATPToolEditor *this = (ATPToolEditor *)user_data;
 
@@ -653,7 +713,7 @@ on_editor_terminal_toggle (GtkToggleButton *tb, gpointer user_data)
 }
 
 void
-on_editor_script_toggle (GtkToggleButton *tb, gpointer user_data)
+atp_on_editor_script_toggle (GtkToggleButton *tb, gpointer user_data)
 {
 	ATPToolEditor *this = (ATPToolEditor *)user_data;
 	gchar* command;
@@ -702,7 +762,7 @@ on_editor_script_toggle (GtkToggleButton *tb, gpointer user_data)
 }
 
 void
-on_editor_input_changed (GtkComboBox *combo, gpointer user_data)
+atp_on_editor_input_changed (GtkComboBox *combo, gpointer user_data)
 {
 	ATPToolEditor *this = (ATPToolEditor *)user_data;
 
@@ -710,7 +770,7 @@ on_editor_input_changed (GtkComboBox *combo, gpointer user_data)
 }
 
 void
-on_editor_dialog_response (GtkDialog *dialog, gint response, gpointer user_data)
+atp_on_editor_dialog_response (GtkDialog *dialog, gint response, gpointer user_data)
 {
 	ATPToolEditor* this = (ATPToolEditor*)user_data;
 	gchar* name;
@@ -877,7 +937,7 @@ on_editor_dialog_response (GtkDialog *dialog, gint response, gpointer user_data)
 }
 
 void
-on_editor_param_variable_show (GtkButton *button, gpointer user_data)
+atp_on_editor_param_variable_show (GtkButton *button, gpointer user_data)
 {
 	ATPToolEditor* this = (ATPToolEditor*)user_data;
 
@@ -885,7 +945,7 @@ on_editor_param_variable_show (GtkButton *button, gpointer user_data)
 }
 
 void
-on_editor_dir_variable_show (GtkButton *button, gpointer user_data)
+atp_on_editor_dir_variable_show (GtkButton *button, gpointer user_data)
 {
 	ATPToolEditor* this = (ATPToolEditor*)user_data;
 
@@ -893,7 +953,7 @@ on_editor_dir_variable_show (GtkButton *button, gpointer user_data)
 }
 
 void
-on_editor_input_variable_show (GtkButton *button, gpointer user_data)
+atp_on_editor_input_variable_show (GtkButton *button, gpointer user_data)
 {
 	ATPToolEditor* this = (ATPToolEditor*)user_data;
 
@@ -972,7 +1032,7 @@ on_editor_get_keys(GtkWidget *widget, GdkEventKey *event, gpointer user_data)
 }
 
 void
-on_editor_shortcut_toggle (GtkToggleButton *tb, gpointer user_data)
+atp_on_editor_shortcut_toggle (GtkToggleButton *tb, gpointer user_data)
 {
 	ATPToolEditor *this = (ATPToolEditor *)user_data;
 
@@ -992,8 +1052,8 @@ on_editor_shortcut_toggle (GtkToggleButton *tb, gpointer user_data)
 	}
 }
 
-static void
-on_editor_browse_button_clicked (GtkButton *button, GtkEntry *entry)
+void
+atp_on_editor_browse_button_clicked (GtkButton *button, GtkEntry *entry)
 {
 	GtkWidget *dialog;
 	dialog = gtk_file_chooser_dialog_new ("Open File",
@@ -1014,8 +1074,8 @@ on_editor_browse_button_clicked (GtkButton *button, GtkEntry *entry)
 	gtk_widget_destroy(dialog);
 }
 
-static void
-on_editor_browse_button_dir_clicked (GtkButton *button, GtkEntry *entry)
+void
+atp_on_editor_browse_button_dir_clicked (GtkButton *button, GtkEntry *entry)
 {
 	GtkWidget *dialog;
 	dialog = gtk_file_chooser_dialog_new ("Open",
@@ -1039,9 +1099,7 @@ on_editor_browse_button_dir_clicked (GtkButton *button, GtkEntry *entry)
 gboolean
 atp_tool_editor_show (ATPToolEditor* this)
 {
-	GtkWidget *button;
-	GtkBuilder *bxml = gtk_builder_new ();
-	GError* error = NULL;
+	GtkBuilder *bxml;
 
 	if (this->dialog != NULL)
 	{
@@ -1050,44 +1108,37 @@ atp_tool_editor_show (ATPToolEditor* this)
 		return TRUE;
 	}
 
-	if (!gtk_builder_add_from_file (bxml, GLADE_FILE, &error))
-	{
-		g_warning ("Couldn't load builder file: %s", error->message);
-		anjuta_util_dialog_error (atp_tool_dialog_get_window (this->parent), _("Unable to build user interface for tool editor"));
-		g_free(this);
-		g_error_free (error);
-		return FALSE;
-	}
-	this->dialog = GTK_WIDGET (gtk_builder_get_object (bxml, TOOL_EDITOR));
+	bxml = anjuta_util_builder_new (GLADE_FILE, NULL);
+	if (!bxml) return FALSE;
+
+	/* Get all objects */
+	anjuta_util_builder_get_objects (bxml,
+	    TOOL_EDITOR, &this->dialog,
+		TOOL_NAME, &this->name_en ,
+		TOOL_COMMAND, &this->command_en,
+		TOOL_PARAM, &this->param_en,
+		TOOL_WORKING_DIR, &this->dir_en,
+		TOOL_ENABLED, &this->enabled_tb,
+		TOOL_TERMINAL, &this->terminal_tb,
+		TOOL_AUTOSAVE, &this->autosave_tb,
+		TOOL_SCRIPT, &this->script_tb,
+		TOOL_OUTPUT, &this->output_com,
+		TOOL_ERROR, &this->error_com,
+		TOOL_INPUT, &this->input_com,
+		TOOL_INPUT_VALUE, &this->input_en,
+		TOOL_INPUT_VARIABLE, &this->input_var_bt,
+		TOOL_SHORTCUT, &this->shortcut_bt,
+		TOOL_ICON, &this->icon_en,
+	    NULL);
+	    
 	gtk_widget_show (this->dialog);
 	gtk_window_set_transient_for (GTK_WINDOW (this->dialog), atp_plugin_get_app_window (this->parent->plugin));
 
-	this->name_en = GTK_EDITABLE (gtk_builder_get_object (bxml, TOOL_NAME));
-	this->command_en = GTK_EDITABLE (gtk_builder_get_object (bxml, TOOL_COMMAND));
-	this->param_en = GTK_EDITABLE (gtk_builder_get_object (bxml, TOOL_PARAM));
+	/* Initialize entries */
 	atp_variable_dialog_set_entry (&this->param_var, this->param_en);
-	this->dir_en = GTK_EDITABLE (gtk_builder_get_object (bxml, TOOL_WORKING_DIR));
 	atp_variable_dialog_set_entry (&this->dir_var, this->dir_en);
-	this->enabled_tb = GTK_TOGGLE_BUTTON (gtk_builder_get_object (bxml, TOOL_ENABLED));
-	this->terminal_tb = GTK_TOGGLE_BUTTON (gtk_builder_get_object (bxml, TOOL_TERMINAL));
-	this->autosave_tb = GTK_TOGGLE_BUTTON (gtk_builder_get_object (bxml, TOOL_AUTOSAVE));
-	this->script_tb = GTK_TOGGLE_BUTTON (gtk_builder_get_object (bxml, TOOL_SCRIPT));
-	this->output_com = GTK_COMBO_BOX (gtk_builder_get_object (bxml, TOOL_OUTPUT));
-	this->error_com = GTK_COMBO_BOX (gtk_builder_get_object (bxml, TOOL_ERROR));
-	this->input_com = GTK_COMBO_BOX (gtk_builder_get_object (bxml, TOOL_INPUT));
-	this->input_en = GTK_EDITABLE (gtk_builder_get_object (bxml, TOOL_INPUT_VALUE));
-	this->input_var_bt = GTK_BUTTON (gtk_builder_get_object (bxml, TOOL_INPUT_VARIABLE));
-	this->shortcut_bt = GTK_TOGGLE_BUTTON (gtk_builder_get_object (bxml, TOOL_SHORTCUT));
 	atp_variable_dialog_set_entry (&this->input_file_var, this->input_en);
 	atp_variable_dialog_set_entry (&this->input_string_var, this->input_en);
-	this->icon_en = GTK_BUTTON (gtk_builder_get_object (bxml, TOOL_ICON));
-
-	button = GTK_WIDGET (gtk_builder_get_object (bxml, TOOL_BROWSE_WORKING_DIR));
-	g_signal_connect(G_OBJECT(button), "clicked", 
-					G_CALLBACK(on_editor_browse_button_dir_clicked), this->dir_en);
-	button = GTK_WIDGET (gtk_builder_get_object (bxml, TOOL_BROWSE_COMMAND));
-	g_signal_connect(G_OBJECT(button), "clicked", 
-					G_CALLBACK(on_editor_browse_button_clicked), this->command_en);
 
 	/* Add combox box value */
 	set_combo_box_enum_model (this->error_com, atp_get_error_type_list());
@@ -1100,7 +1151,7 @@ atp_tool_editor_show (ATPToolEditor* this)
 
 	/* Connect all signals */
 	gtk_builder_connect_signals (bxml, this);
-
+	
 	g_object_unref (bxml);
 
 	return TRUE;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]