commit ae4cb23c7ac34202df63c544631153b987f7bee5
Author: Paul Richardson aka phantomjinx <[email protected]>
Date:   Thu Apr 15 23:08:41 2010 +0100

    Cleanup and move to anjuta 2.28.2
    
    * configure.in
     - Seems that anjuta needs to be in the CFLAGS and LIBS vars.
     - Needed for anjuta-*.* in src directory
    
    * gtkpod.glade
     - Preferences window moved to its own preferences.ui files since
       the api for anjuta_preferences window has moved to GtkBuilder
    
    * Makefile.am
     - Housekeeping for linking to preferences.ui
    
    * anjuta-app.c
     - Updates to match the anjuta 2.28.2 source

 configure.in                  |   14 +-
 data/glade/gtkpod.glade       |  173 --------------------
 data/ui/Makefile.am           |   27 ++-
 data/ui/preferences.ui        |  352 +++++++++++++++++++++++++++++++++++++++++
 src/anjuta-action-callbacks.h |   12 +-
 src/anjuta-app.c              |   84 ++++++----
 6 files changed, 437 insertions(+), 225 deletions(-)
---
diff --git a/configure.in b/configure.in
index 5bb9507..b8f4dc9 100644
--- a/configure.in
+++ b/configure.in
@@ -15,7 +15,7 @@ LIBGTKPOD_MINOR_VERSION=99
 LIBGTKPOD_MICRO_VERSION=15
 # If you need a modifier for the version number. 
 # Normally empty, but can be used to make "fixup" releases.
-LIBGTKPOD_EXTRAVERSION=SVN
+LIBGTKPOD_EXTRAVERSION=GIT
 
 
LIBGTKPOD_VERSION=$LIBGTKPOD_MAJOR_VERSION.$LIBGTKPOD_MINOR_VERSION.$LIBGTKPOD_MICRO_VERSION$LIBGTKPOD_EXTRAVERSION
 
@@ -75,11 +75,11 @@ PKG_CHECK_MODULES(GMODULE, gmodule-2.0,, 
[AC_MSG_FAILURE([*** $GMODULE_PKG_ERROR
 PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 0.14.0,, [AC_MSG_FAILURE([*** 
$GTHREAD_PKG_ERRORS])])
 PKG_CHECK_MODULES(LIBGLADE, libglade-2.0 >= 2.4.0,, [AC_MSG_FAILURE([*** 
$LIBGLADE_PKG_ERRORS])])
 PKG_CHECK_MODULES(LIBGPOD, libgpod-1.0 >= 0.7.0,, [AC_MSG_FAILURE([*** 
$LIBGPOD_PKG_ERRORS])])
-PKG_CHECK_MODULES(LIBANJUTA, libanjuta-1.0 >= 2.26.2.2,, [AC_MSG_FAILURE([*** 
$LIBANJUTA_PKG_ERRORS])])
+PKG_CHECK_MODULES(LIBANJUTA, libanjuta-1.0 >= 2.28.2,, [AC_MSG_FAILURE([*** 
$LIBANJUTA_PKG_ERRORS])])
 PKG_CHECK_MODULES(LIBGDL, gdl-1.0 >= 2.26.0,, [AC_MSG_FAILURE([*** 
$LIBGDL_PKG_ERRORS])])
 
-CFLAGS="$CFLAGS $GTK_CFLAGS $GLIB_CFLAGS $GMODULE_CFLAGS $GTHREAD_CFLAGS 
$LIBGLADE_CFLAGS $LIBGPOD_CFLAGS $LIBGDL_CFLAGS"
-LIBS="$LIBS $GTK_LIBS $GLIB_LIBS $GMODULE_LIBS $GTHREAD_LIBS $LIBGLADE_LIBS 
$LIBGPOD_LIBS $LIBGDL_LIBS"
+CFLAGS="$CFLAGS $GTK_CFLAGS $GLIB_CFLAGS $GMODULE_CFLAGS $GTHREAD_CFLAGS 
$LIBGLADE_CFLAGS $LIBGPOD_CFLAGS $LIBANJUTA_CFLAGS $LIBGDL_CFLAGS"
+LIBS="$LIBS $GTK_LIBS $GLIB_LIBS $GMODULE_LIBS $GTHREAD_LIBS $LIBGLADE_LIBS 
$LIBGPOD_LIBS $LIBANJUTA_LIBS $LIBGDL_LIBS"
 
 dnl Setup Gtkpod flags for building library
 dnl --------------------------
@@ -91,8 +91,8 @@ AC_SUBST(LIBGTKPOD_LIBS)
 dnl Setup Gtkpod flags for building platform
 dnl --------------------------
 LIBGTKPOD_STATIC='$(top_builddir)/libgtkpod/libgtkpod.la'
-GTKPOD_LIBS="$LIBGTKPOD_STATIC $LIBANJUTA_LIBS"
-GTKPOD_CFLAGS="$CFLAGS $LIBANJUTA_CFLAGS"
+GTKPOD_LIBS="$LIBGTKPOD_STATIC"
+GTKPOD_CFLAGS="$CFLAGS"
 AC_SUBST(GTKPOD_CFLAGS)
 AC_SUBST(GTKPOD_LIBS)
 
@@ -258,6 +258,8 @@ AC_SUBST(gtkpod_ui_dir)
 AC_SUBST(gtkpod_glade_dir)
 AC_SUBST(gtkpod_image_dir)
 
+m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
+
 AC_OUTPUT([
 Makefile
 src/Makefile
diff --git a/data/glade/gtkpod.glade b/data/glade/gtkpod.glade
index 0b8c5c7..150107c 100644
--- a/data/glade/gtkpod.glade
+++ b/data/glade/gtkpod.glade
@@ -2,179 +2,6 @@
 <glade-interface>
   <!-- interface-requires gtk+ 2.16 -->
   <!-- interface-naming-policy toplevel-contextual -->
-  <widget class="GtkWindow" id="gtkpod_preferences_window">
-    <child>
-      <widget class="GtkNotebook" id="General">
-        <property name="visible">True</property>
-        <property name="can_focus">True</property>
-        <child>
-          <widget class="GtkVBox" id="general_page">
-            <property name="visible">True</property>
-            <property name="spacing">5</property>
-            <property name="homogeneous">True</property>
-            <child>
-              <widget class="GtkFrame" id="Session">
-                <property name="visible">True</property>
-                <property name="border_width">10</property>
-                <property name="label_xalign">0</property>
-                <property name="shadow_type">none</property>
-                <child>
-                  <widget class="GtkAlignment" id="alignment1">
-                    <property name="visible">True</property>
-                    <property name="left_padding">12</property>
-                    <child>
-                      <widget class="GtkVBox" id="vbox2">
-                        <property name="visible">True</property>
-                        <property name="border_width">10</property>
-                        <property name="orientation">vertical</property>
-                        <property name="spacing">5</property>
-                        <child>
-                          <widget class="GtkCheckButton" 
id="preferences_toggle:bool:0:0:anjuta.session.skip.last">
-                            <property name="label" translatable="yes">Do not 
load last session on startup</property>
-                            <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="draw_indicator">True</property>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label5">
-                    <property name="visible">True</property>
-                    <property name="label" 
translatable="yes">&lt;b&gt;Session&lt;/b&gt;</property>
-                    <property name="use_markup">True</property>
-                  </widget>
-                  <packing>
-                    <property name="type">label_item</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkFrame" id="Appearance">
-                <property name="visible">True</property>
-                <property name="border_width">10</property>
-                <property name="label_xalign">0</property>
-                <property name="shadow_type">none</property>
-                <child>
-                  <widget class="GtkAlignment" id="alignment3">
-                    <property name="visible">True</property>
-                    <property name="left_padding">12</property>
-                    <child>
-                      <widget class="GtkTable" id="table2">
-                        <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="border_width">10</property>
-                        <property name="n_rows">2</property>
-                        <property name="n_columns">2</property>
-                        <property name="column_spacing">5</property>
-                        <property name="row_spacing">5</property>
-                        <child>
-                          <widget class="GtkComboBox" 
id="preferences_combo:text:Text,Icon,Both,Toolbar,Tabs:2:anjuta.gdl.style">
-                            <property name="visible">True</property>
-                            <property name="items" translatable="yes">Text
-Icons
-Text + Icons
-Gnome toolbar setting
-Tabs</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkComboBox" 
id="preferences_combo:text:Default,Both,Horiz,Icons,Text:0:anjuta.toolbar.style">
-                            <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="items" translatable="yes">Default
-Text below icons
-Text beside icons
-Icons only
-Text only</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>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label6">
-                            <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="xalign">0</property>
-                            <property name="label" translatable="yes" 
comments="translators: translate the same as in gnome-control-center">Toolbar 
button labels:</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label8">
-                            <property name="visible">True</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes" 
comments="Style of the buttons/tabs used to select docked windows in 
anjuta">Dock switcher style:</property>
-                          </widget>
-                          <packing>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label7">
-                    <property name="visible">True</property>
-                    <property name="label" 
translatable="yes">&lt;b&gt;Appearance&lt;/b&gt;</property>
-                    <property name="use_markup">True</property>
-                  </widget>
-                  <packing>
-                    <property name="type">label_item</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-        </child>
-        <child>
-          <widget class="GtkLabel" id="label9">
-            <property name="visible">True</property>
-            <property name="label" translatable="yes">General</property>
-          </widget>
-          <packing>
-            <property name="tab_fill">False</property>
-            <property name="type">tab</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
   <widget class="GtkDialog" id="confirm_dialog">
     <property name="border_width">6</property>
     <property name="title" translatable="yes"> </property>
diff --git a/data/ui/Makefile.am b/data/ui/Makefile.am
index 9d8cb2a..3ec6bc7 100644
--- a/data/ui/Makefile.am
+++ b/data/ui/Makefile.am
@@ -1,22 +1,31 @@
 appdatadir = $(pkgdatadir)/data/ui
-appdata_DATA =                         \
-       gtkpod.ui
+appdata_gtkpod = gtkpod.ui
+appdata_preferences = preferences.ui
 
 EXTRA_DIST =                           \
-       $(appdata_DATA)
+       $(appdata_gtkpod) \
+       $(appdata_preferences)
 
 include ../directories.mk
        
-all-local: create-ui-link
+all-local: create-gtkpod-ui-link create-preferences-ui-link
 
 # Creating symbolic link to ui file in installed ui directory
-create-ui-link: create-ui-dir
-       if test -e $(gtkpod_ui_dir)/$(appdata_DATA); then \
+create-gtkpod-ui-link: create-ui-dir
+       if test -e $(gtkpod_ui_dir)/$(appdata_gtkpod); then \
       # File already exists. Replacing ..." \
-      sudo rm -f $(gtkpod_ui_dir)/$(appdata_DATA); \
+      sudo rm -f $(gtkpod_ui_dir)/$(appdata_gtkpod); \
+       fi; \
+    # Creating link for $(appdata_gtkpod)" \
+       sudo ln -s `pwd`/$(appdata_gtkpod) $(gtkpod_ui_dir)/$(appdata_gtkpod);
+
+create-preferences-ui-link: create-ui-dir
+       if test -e $(gtkpod_ui_dir)/$(appdata_preferences); then \
+      # File already exists. Replacing ..." \
+      sudo rm -f $(gtkpod_ui_dir)/$(appdata_preferences); \
        fi; \
-    # Creating link for $(appdata_DATA)" \
-       sudo ln -s `pwd`/$(appdata_DATA) $(gtkpod_ui_dir)/$(appdata_DATA);
+    # Creating link for $(appdata_preferences)" \
+       sudo ln -s `pwd`/$(appdata_preferences) 
$(gtkpod_ui_dir)/$(appdata_preferences);
 
 create-ui-dir:
        if test ! -d $(gtkpod_ui_dir); then \
diff --git a/data/ui/preferences.ui b/data/ui/preferences.ui
new file mode 100644
index 0000000..02dc890
--- /dev/null
+++ b/data/ui/preferences.ui
@@ -0,0 +1,352 @@
+<?xml version="1.0"?>
+<interface>
+  <requires lib="gtk+" version="2.16"/>
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="GtkListStore" id="model1">
+    <columns>
+      <!-- column-name gchararray -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">Text</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Icons</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Text + Icons</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">GNOME toolbar setting</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Tabs</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="model2">
+    <columns>
+      <!-- column-name gchararray -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">Default</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Text below icons</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Text beside icons</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Icons only</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Text only</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkWindow" id="gtkpod_preferences_window">
+    <child>
+      <object class="GtkNotebook" id="General">
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <child>
+          <object class="GtkVBox" id="general_page">
+            <property name="visible">True</property>
+            <child>
+              <object class="GtkFrame" id="frame1">
+                <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="border_width">10</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment2">
+                    <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="left_padding">12</property>
+                    <child>
+                      <object class="GtkTable" id="table1">
+                        <property name="visible">True</property>
+                        <property name="border_width">10</property>
+                        <property name="n_rows">3</property>
+                        <property name="n_columns">2</property>
+                        <property name="column_spacing">5</property>
+                        <property name="row_spacing">5</property>
+                        <child>
+                          <object class="GtkLabel" id="label2">
+                            <property name="visible">True</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Default 
project directory:</property>
+                          </object>
+                          <packing>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label3">
+                            <property name="visible">True</property>
+                            <property name="xalign">0</property>
+                            <property name="label" 
translatable="yes">Developer name:</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label4">
+                            <property name="visible">True</property>
+                            <property name="xalign">0</property>
+                            <property name="label" 
translatable="yes">Developer email address:</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">2</property>
+                            <property name="bottom_attach">3</property>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkEntry" 
id="preferences_entry:text::0:anjuta.user.email">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">2</property>
+                            <property name="bottom_attach">3</property>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkEntry" 
id="preferences_entry:text::0:anjuta.user.name">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                          </object>
+                          <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>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkFileChooserButton" 
id="preferences_folder:text:~:0:anjuta.project.directory">
+                            <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="action">select-folder</property>
+                            <property name="title" translatable="yes">Select 
project directory</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label1">
+                    <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">Project 
Defaults</property>
+                    <attributes>
+                      <attribute name="weight" value="bold"/>
+                    </attributes>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="Session">
+                <property name="visible">True</property>
+                <property name="border_width">10</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment1">
+                    <property name="visible">True</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkVBox" id="vbox2">
+                        <property name="visible">True</property>
+                        <property name="border_width">10</property>
+                        <property name="spacing">5</property>
+                        <child>
+                          <object class="GtkCheckButton" 
id="preferences_toggle:bool:0:0:anjuta.session.skip.last">
+                            <property name="label" translatable="yes">Do not 
load last session on startup</property>
+                            <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="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" 
id="preferences_toggle:bool:0:0:anjuta.session.skip.last.files">
+                            <property name="label" translatable="yes">Do not 
load last project and files on startup</property>
+                            <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="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label5">
+                    <property name="visible">True</property>
+                    <property name="label" 
translatable="yes">Session</property>
+                    <attributes>
+                      <attribute name="weight" value="bold"/>
+                    </attributes>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="Appearance">
+                <property name="visible">True</property>
+                <property name="border_width">10</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment3">
+                    <property name="visible">True</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkTable" id="table2">
+                        <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="border_width">10</property>
+                        <property name="n_rows">2</property>
+                        <property name="n_columns">2</property>
+                        <property name="column_spacing">5</property>
+                        <property name="row_spacing">5</property>
+                        <child>
+                          <object class="GtkComboBox" 
id="preferences_combo:text:Text,Icon,Both,Toolbar,Tabs:2:anjuta.gdl.style">
+                            <property name="visible">True</property>
+                            <property name="model">model1</property>
+                            <child>
+                              <object class="GtkCellRendererText" 
id="renderer1"/>
+                              <attributes>
+                                <attribute name="text">0</attribute>
+                              </attributes>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkComboBox" 
id="preferences_combo:text:Default,Both,Horiz,Icons,Text:0:anjuta.toolbar.style">
+                            <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="model">model2</property>
+                            <child>
+                              <object class="GtkCellRendererText" 
id="renderer2"/>
+                              <attributes>
+                                <attribute name="text">0</attribute>
+                              </attributes>
+                            </child>
+                          </object>
+                          <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>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label6">
+                            <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="xalign">0</property>
+                            <property name="label" translatable="yes" 
comments="translators: translate the same as in gnome-control-center">Toolbar 
button labels:</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label8">
+                            <property name="visible">True</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes" 
comments="Style of the buttons/tabs used to select docked windows in 
anjuta">Dock switcher style:</property>
+                          </object>
+                          <packing>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label7">
+                    <property name="visible">True</property>
+                    <property name="label" 
translatable="yes">Appearance</property>
+                    <attributes>
+                      <attribute name="weight" value="bold"/>
+                    </attributes>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+        </child>
+        <child type="tab">
+          <object class="GtkLabel" id="label9">
+            <property name="visible">True</property>
+            <property name="label" translatable="yes">General</property>
+          </object>
+          <packing>
+            <property name="tab_fill">False</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/src/anjuta-action-callbacks.h b/src/anjuta-action-callbacks.h
index e2b403f..6f3fdc3 100644
--- a/src/anjuta-action-callbacks.h
+++ b/src/anjuta-action-callbacks.h
@@ -1,26 +1,26 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
-/* 
+/*
  * mainmenu_callbacks.h
  * Copyright (C) 2003 Naba Kumar  <[email protected]>
- * 
+ *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the Free
  * Software Foundation; either version 2 of the License, or (at your option)
  * any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful, but WITHOUT
  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
- * 
- * You should have received a copy of the GNU General Public License along 
with 
+ *
+ * You should have received a copy of the GNU General Public License along with
  * this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 #ifndef _MAINMENU_CALLBACKS_H_
 #define _MAINMENU_CALLBACKS_H_
 
-#include <gnome.h>
+#include <gtk/gtk.h>
 
 void on_exit1_activate (GtkAction * action, AnjutaApp *app);
 void on_fullscreen_toggle (GtkAction *action, AnjutaApp *app);
diff --git a/src/anjuta-app.c b/src/anjuta-app.c
index 702484e..5713085 100644
--- a/src/anjuta-app.c
+++ b/src/anjuta-app.c
@@ -80,11 +80,9 @@ void anjuta_set_ui_file_path(gchar * path) {
     uifile = path;
 }
 
-static void on_toolbar_style_changed(GConfClient* client, guint id, 
GConfEntry* entry, gpointer user_data) {
+static void on_toolbar_style_changed(AnjutaPreferences* prefs, const gchar* 
key, const gchar* tb_style, gpointer user_data) {
     AnjutaApp* app = ANJUTA_APP (user_data);
 
-    char* tb_style = anjuta_preferences_get(app->preferences, 
"anjuta.toolbar.style");
-
     if (tb_style) {
         if (strcasecmp(tb_style, "Default") == 0)
             style = -1;
@@ -98,8 +96,6 @@ static void on_toolbar_style_changed(GConfClient* client, 
guint id, GConfEntry*
             style = GTK_TOOLBAR_TEXT;
 
         DEBUG_PRINT ("Toolbar style: %s", tb_style);
-
-        g_free(tb_style);
     }
 
     if (style != -1) {
@@ -110,12 +106,10 @@ static void on_toolbar_style_changed(GConfClient* client, 
guint id, GConfEntry*
     }
 }
 
-static void on_gdl_style_changed(GConfClient* client, guint id, GConfEntry* 
entry, gpointer user_data) {
+static void on_gdl_style_changed(AnjutaPreferences* prefs, const gchar* key, 
const gchar* pr_style, gpointer user_data) {
     AnjutaApp* app = ANJUTA_APP (user_data);
     GdlSwitcherStyle style = GDL_SWITCHER_STYLE_BOTH;
 
-    gchar* pr_style = anjuta_preferences_get(app->preferences, 
"anjuta.gdl.style");
-
     if (pr_style) {
         if (strcasecmp(pr_style, "Text") == 0)
             style = GDL_SWITCHER_STYLE_TEXT;
@@ -129,20 +123,18 @@ static void on_gdl_style_changed(GConfClient* client, 
guint id, GConfEntry* entr
             style = GDL_SWITCHER_STYLE_TABS;
 
         DEBUG_PRINT ("Switcher style: %s", pr_style);
-
-        g_free(pr_style);
     }
     g_object_set(G_OBJECT(app->layout_manager->master), "switcher-style", 
style, NULL);
 }
 
-static void anjuta_gtkpod_app_display_widget (GtkWidget *widget) {
+static void anjuta_gtkpod_app_display_widget(GtkWidget *widget) {
     g_return_if_fail(widget);
 
     GtkWidget *w;
     if (GDL_IS_DOCK_ITEM(widget))
         w = widget;
     else {
-        w = g_object_get_data (G_OBJECT (widget), "dockitem");
+        w = g_object_get_data(G_OBJECT (widget), "dockitem");
     }
 
     if (w && !gtk_widget_get_visible(w)) {
@@ -337,6 +329,7 @@ static void anjuta_app_instance_init(AnjutaApp *app) {
     GtkWidget *main_box;
     GtkWidget *dockbar;
     GtkAction* action;
+    gchar* style;
     GList *plugins_dirs = NULL;
     GdkGeometry size_hints =
         { 100, 100, 0, 0, 100, 100, 1, 1, 0.0, 0.0, GDK_GRAVITY_NORTH_WEST };
@@ -396,9 +389,11 @@ static void anjuta_app_instance_init(AnjutaApp *app) {
     app->preferences = anjuta_preferences_new(app->plugin_manager);
     g_object_add_weak_pointer(G_OBJECT (app->preferences), (gpointer) 
&app->preferences);
 
-    anjuta_preferences_notify_add(app->preferences, "anjuta.gdl.style", 
on_gdl_style_changed, app, NULL);
+    anjuta_preferences_notify_add_string(app->preferences, "anjuta.gdl.style", 
on_gdl_style_changed, app, NULL);
+    style = anjuta_preferences_get(app->preferences, "anjuta.gdl.style");
 
-    on_gdl_style_changed(NULL, 0, NULL, app);
+    on_gdl_style_changed(app->preferences, NULL, style, app);
+    g_free(style);
 
     /* Register actions */
     anjuta_ui_add_action_group_entries(app->ui, "ActionGroupMusic", 
_("Music"), menu_entries_music, G_N_ELEMENTS (menu_entries_music), 
GETTEXT_PACKAGE, TRUE, app);
@@ -421,13 +416,15 @@ static void anjuta_app_instance_init(AnjutaApp *app) {
 
     /* create toolbar */
     app->toolbar = gtk_ui_manager_get_widget(GTK_UI_MANAGER (app->ui), 
"/ToolbarMain");
-    if (!anjuta_preferences_get_int(app->preferences, 
"anjuta.toolbar.visible"))
+    if (!anjuta_preferences_get_bool(app->preferences, 
"anjuta.toolbar.visible"))
         gtk_widget_hide(app->toolbar);
     gtk_box_pack_start(GTK_BOX (main_box), app->toolbar, FALSE, FALSE, 0);
     action = gtk_ui_manager_get_action(GTK_UI_MANAGER (app->ui), 
"/MenuMain/MenuView/Toolbar");
-    gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), 
anjuta_preferences_get_int_with_default(app->preferences, 
"anjuta.toolbar.visible", TRUE));
-    anjuta_preferences_notify_add(app->preferences, "anjuta.toolbar.style", 
on_toolbar_style_changed, app, NULL);
-    on_toolbar_style_changed(NULL, 0, NULL, app);
+    gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), 
anjuta_preferences_get_bool_with_default(app->preferences, 
"anjuta.toolbar.visible", TRUE));
+    anjuta_preferences_notify_add_string(app->preferences, 
"anjuta.toolbar.style", on_toolbar_style_changed, app, NULL);
+    style = anjuta_preferences_get(app->preferences, "anjuta.toolbar.style");
+    on_toolbar_style_changed(app->preferences, NULL, style, app);
+    g_free(style);
 
     /* Create widgets menu */
     view_menu = gtk_ui_manager_get_widget(GTK_UI_MANAGER(app->ui), 
"/MenuMain/MenuView");
@@ -569,19 +566,45 @@ void anjuta_app_layout_reset(AnjutaApp *app) {
 }
 
 void anjuta_app_install_preferences(AnjutaApp *app) {
-    GladeXML *gxml;
-    GtkWidget *notebook, *plugins;
+//    GladeXML *gxml;
+//    GtkWidget *notebook, *plugins;
+
+    /* Create preferences page */
+    //      gxml = gtkpod_core_xml_new("gtkpod_preferences_window");
+    //    anjuta_preferences_add_page(app->preferences, gxml, "General", 
_("General"), ICON_FILE);
+    //    notebook = glade_xml_get_widget(gxml, "General");
+    //    plugins = 
anjuta_plugin_manager_get_plugins_page(app->plugin_manager);
+    //    gtk_widget_show(plugins);
+    //
+    //    gtk_notebook_append_page(GTK_NOTEBOOK (notebook), plugins, 
gtk_label_new(_("Installed plugins")));
+    //
+    //    g_object_unref(gxml);
+    GtkBuilder* builder = gtk_builder_new();
+    GError* error = NULL;
+    GtkWidget *notebook, *shortcuts, *plugins, *remember_plugins;
+    gchar* pref_ui_file = NULL;
 
     /* Create preferences page */
-    gxml = gtkpod_core_xml_new("gtkpod_preferences_window");
-    anjuta_preferences_add_page(app->preferences, gxml, "General", 
_("General"), ICON_FILE);
-    notebook = glade_xml_get_widget(gxml, "General");
+    pref_ui_file = g_build_filename(get_ui_dir(), "preferences.ui", NULL);
+    gtk_builder_add_from_file(builder, pref_ui_file, &error);
+    if (error) {
+        g_warning("Could not load general preferences: %s",
+                error->message);
+        g_error_free(error);
+        return;
+    }
+    anjuta_preferences_add_from_builder(app->preferences, builder, "General", 
_("General"), ICON_FILE);
+    notebook = GTK_WIDGET (gtk_builder_get_object (builder, "General"));
+    shortcuts = anjuta_ui_get_accel_editor(ANJUTA_UI (app->ui));
     plugins = anjuta_plugin_manager_get_plugins_page(app->plugin_manager);
+    remember_plugins = 
anjuta_plugin_manager_get_remembered_plugins_page(app->plugin_manager);
+
+    gtk_widget_show(shortcuts);
     gtk_widget_show(plugins);
+    gtk_widget_show(remember_plugins);
 
     gtk_notebook_append_page(GTK_NOTEBOOK (notebook), plugins, 
gtk_label_new(_("Installed plugins")));
-
-    g_object_unref(gxml);
+    gtk_notebook_append_page(GTK_NOTEBOOK (notebook), remember_plugins, 
gtk_label_new(_("Preferred plugins")));
 }
 
 /* AnjutaShell Implementation */
@@ -1377,13 +1400,12 @@ static void gtkpod_app_iface_init(GtkPodAppInterface 
*iface) {
     iface->repository_editor = NULL;
 }
 
-G_MODULE_EXPORT void on_confirm_tree_size_allocate (GtkWidget *sender, 
GtkAllocation *allocation, gpointer e)
-{
+G_MODULE_EXPORT void on_confirm_tree_size_allocate(GtkWidget *sender, 
GtkAllocation *allocation, gpointer e) {
     GtkCellRenderer *renderer = GTK_CELL_RENDERER (g_object_get_data (G_OBJECT 
(sender), "renderer"));
-    g_object_set (renderer, "wrap-width", allocation->width, NULL);
+    g_object_set(renderer, "wrap-width", allocation->width, NULL);
 }
 
 ANJUTA_TYPE_BEGIN(AnjutaApp, anjuta_app, GTK_TYPE_WINDOW);
-ANJUTA_TYPE_ADD_INTERFACE(anjuta_shell, ANJUTA_TYPE_SHELL);
-ANJUTA_TYPE_ADD_INTERFACE(gtkpod_app, GTKPOD_APP_TYPE);
-ANJUTA_TYPE_END;
+            ANJUTA_TYPE_ADD_INTERFACE(anjuta_shell, ANJUTA_TYPE_SHELL);
+            ANJUTA_TYPE_ADD_INTERFACE(gtkpod_app, 
GTKPOD_APP_TYPE);ANJUTA_TYPE_END
+;

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to