commit 017af36f7c6a6805126f472cc625af8a1e1fc95c Author: phantomjinx <p.g.richard...@phantomjinx.co.uk> Date: Thu Feb 17 23:57:14 2011 +0000
Migrate playlist display glade to gtkbuilder .gitignore | 2 +- plugins/playlist_display/Makefile.am | 2 +- ...playlist_display.glade => playlist_display.xml} | 96 ++++++++++---------- .../playlist_display_preferences.c | 23 +++-- po/POTFILES.in | 2 +- po/POTFILES.skip | 2 +- 6 files changed, 63 insertions(+), 64 deletions(-) --- diff --git a/.gitignore b/.gitignore index 21e4d90..6c9a75d 100644 --- a/.gitignore +++ b/.gitignore @@ -88,7 +88,7 @@ version /data/glade/core_prefs.xml /data/glade/photo_editor.glade /data/glade/media_player.glade -/data/glade/playlist_display.glade +/data/glade/playlist_display.xml /data/glade/mserv.xml /data/ui/details_editor.ui diff --git a/plugins/playlist_display/Makefile.am b/plugins/playlist_display/Makefile.am index bf9a47a..acc79af 100644 --- a/plugins/playlist_display/Makefile.am +++ b/plugins/playlist_display/Makefile.am @@ -7,7 +7,7 @@ playlist_display_ui_DATA = $(plugin_name).ui # Plugin Glade file - No glade/xml file playlist_display_gladedir = $(gtkpod_glade_dir) -playlist_display_glade_DATA = $(plugin_name).glade +playlist_display_glade_DATA = $(plugin_name).xml # Plugin Toolbar file playlist_display_toolbardir = $(gtkpod_glade_dir) diff --git a/plugins/playlist_display/playlist_display.glade b/plugins/playlist_display/playlist_display.xml similarity index 80% rename from plugins/playlist_display/playlist_display.glade rename to plugins/playlist_display/playlist_display.xml index f916840..9551fba 100644 --- a/plugins/playlist_display/playlist_display.glade +++ b/plugins/playlist_display/playlist_display.xml @@ -1,49 +1,49 @@ <?xml version="1.0"?> -<glade-interface> - <!-- interface-requires gtk+ 2.16 --> +<interface> + <requires lib="gtk+" version="2.16"/> <!-- interface-naming-policy project-wide --> - <widget class="GtkWindow" id="prefs_window"> + <object class="GtkWindow" id="prefs_window"> <child> - <widget class="GtkNotebook" id="playlist_settings_notebook"> + <object class="GtkNotebook" id="playlist_settings_notebook"> <property name="visible">True</property> <property name="can_focus">True</property> <child> - <widget class="GtkVBox" id="vbox5"> + <object class="GtkVBox" id="vbox5"> <property name="visible">True</property> <property name="border_width">12</property> <property name="orientation">vertical</property> <property name="spacing">18</property> <child> - <widget class="GtkFrame" id="frame4"> + <object class="GtkFrame" id="frame4"> <property name="visible">True</property> <property name="label_xalign">0</property> <property name="shadow_type">none</property> <child> - <widget class="GtkAlignment" id="alignment14"> + <object class="GtkAlignment" id="alignment14"> <property name="visible">True</property> <property name="top_padding">6</property> <property name="left_padding">12</property> <child> - <widget class="GtkVBox" id="vbox1"> + <object class="GtkVBox" id="vbox1"> <property name="visible">True</property> <property name="orientation">vertical</property> <property name="spacing">10</property> <child> - <widget class="GtkHBox" id="hbox30"> + <object class="GtkHBox" id="hbox30"> <property name="visible">True</property> <child> - <widget class="GtkTable" id="table1"> + <object class="GtkTable" id="table1"> <property name="visible">True</property> <property name="border_width">5</property> <property name="n_rows">2</property> <property name="n_columns">3</property> <child> - <widget class="GtkLabel" id="label82"> + <object class="GtkLabel" id="label82"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="label" translatable="yes"><b>Ascending</b></property> <property name="use_markup">True</property> - </widget> + </object> <packing> <property name="left_attach">1</property> <property name="right_attach">2</property> @@ -51,12 +51,12 @@ </packing> </child> <child> - <widget class="GtkLabel" id="label85"> + <object class="GtkLabel" id="label85"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="label" translatable="yes"><b>Descending</b></property> <property name="use_markup">True</property> - </widget> + </object> <packing> <property name="left_attach">2</property> <property name="right_attach">3</property> @@ -64,7 +64,7 @@ </packing> </child> <child> - <widget class="GtkRadioButton" id="pm_ascend"> + <object class="GtkRadioButton" id="pm_ascend"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> @@ -73,12 +73,12 @@ <property name="group">pm_none</property> <signal name="toggled" handler="on_pm_ascend_toggled"/> <child> - <widget class="GtkImage" id="image1928"> + <object class="GtkImage" id="image1928"> <property name="visible">True</property> <property name="stock">gtk-sort-ascending</property> - </widget> + </object> </child> - </widget> + </object> <packing> <property name="left_attach">1</property> <property name="right_attach">2</property> @@ -88,7 +88,7 @@ </packing> </child> <child> - <widget class="GtkRadioButton" id="pm_descend"> + <object class="GtkRadioButton" id="pm_descend"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> @@ -96,12 +96,12 @@ <property name="group">pm_none</property> <signal name="toggled" handler="on_pm_descend_toggled"/> <child> - <widget class="GtkImage" id="image1929"> + <object class="GtkImage" id="image1929"> <property name="visible">True</property> <property name="stock">gtk-sort-descending</property> - </widget> + </object> </child> - </widget> + </object> <packing> <property name="left_attach">2</property> <property name="right_attach">3</property> @@ -111,98 +111,94 @@ </packing> </child> <child> - <widget class="GtkLabel" id="label86"> + <object class="GtkLabel" id="label86"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="label" translatable="yes"><b>None</b></property> <property name="use_markup">True</property> - </widget> + </object> <packing> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkRadioButton" id="pm_none"> + <object class="GtkRadioButton" id="pm_none"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> <property name="draw_indicator">True</property> <signal name="toggled" handler="on_pm_none_toggled"/> <child> - <widget class="GtkImage" id="image1930"> + <object class="GtkImage" id="image1930"> <property name="visible">True</property> <property name="stock">gtk-undo</property> - </widget> + </object> </child> - </widget> + </object> <packing> <property name="top_attach">1</property> <property name="bottom_attach">2</property> <property name="x_options"></property> </packing> </child> - </widget> + </object> <packing> <property name="position">0</property> </packing> </child> - </widget> + </object> <packing> <property name="position">0</property> </packing> </child> <child> - <widget class="GtkCheckButton" id="pm_cfg_case_sensitive"> + <object class="GtkCheckButton" id="pm_cfg_case_sensitive"> <property name="label" translatable="yes">Case sensitive sorting</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> <property name="has_tooltip">True</property> - <property name="tooltip" translatable="yes">If checked, sorting will be case sensitive. Please note that case sensitive sorting will not work well with most charsets.</property> + <property name="tooltip_text" translatable="yes">If checked, sorting will be case sensitive. Please note that case sensitive sorting will not work well with most charsets.</property> <property name="use_underline">True</property> <property name="draw_indicator">True</property> <signal name="toggled" handler="on_pm_sort_case_sensitive_toggled"/> - </widget> + </object> <packing> <property name="expand">False</property> <property name="fill">False</property> <property name="position">1</property> </packing> </child> - </widget> + </object> </child> - </widget> + </object> </child> - <child> - <widget class="GtkLabel" id="label7"> + <child type="label"> + <object class="GtkLabel" id="label7"> <property name="visible">True</property> <property name="label" translatable="yes"><b>Playlist Sort Order</b></property> <property name="use_markup">True</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> + </object> </child> - </widget> + </object> <packing> <property name="expand">False</property> <property name="fill">False</property> <property name="position">0</property> </packing> </child> - </widget> + </object> </child> - <child> - <widget class="GtkLabel" id="display_page_label"> + <child type="tab"> + <object class="GtkLabel" id="display_page_label"> <property name="visible">True</property> <property name="label" translatable="yes">Playlist Display</property> - </widget> + </object> <packing> <property name="tab_fill">False</property> - <property name="type">tab</property> </packing> </child> - </widget> + </object> </child> - </widget> -</glade-interface> + </object> +</interface> diff --git a/plugins/playlist_display/playlist_display_preferences.c b/plugins/playlist_display/playlist_display_preferences.c index 3b1d03e..913555d 100644 --- a/plugins/playlist_display/playlist_display_preferences.c +++ b/plugins/playlist_display/playlist_display_preferences.c @@ -27,7 +27,6 @@ */ #include <gtk/gtk.h> -#include <glade/glade.h> #include "libgtkpod/prefs.h" #include "libgtkpod/misc.h" #include "libgtkpod/directories.h" @@ -64,35 +63,39 @@ G_MODULE_EXPORT void on_pm_sort_case_sensitive_toggled(GtkToggleButton *togglebu } GtkWidget *init_playlist_display_preferences() { - GladeXML *pref_xml; + GtkBuilder *prefbuilder; GtkWidget *w = NULL; - gchar *glade_path = g_build_filename(get_glade_dir(), "playlist_display.glade", NULL); - pref_xml = gtkpod_xml_new(glade_path, "playlist_settings_notebook"); - notebook = gtkpod_xml_get_widget(pref_xml, "playlist_settings_notebook"); + gchar *glade_path = g_build_filename(get_glade_dir(), "playlist_display.xml", NULL); + prefbuilder = gtkpod_builder_xml_new(glade_path); + w = gtkpod_builder_xml_get_widget(prefbuilder, "prefs_window"); + notebook = gtkpod_builder_xml_get_widget(prefbuilder, "playlist_settings_notebook"); g_object_ref(notebook); + gtk_container_remove(GTK_CONTAINER(w), notebook); + gtk_widget_destroy(w); g_free(glade_path); switch (prefs_get_int("pm_sort")) { case SORT_ASCENDING: - w = gtkpod_xml_get_widget(pref_xml, "pm_ascend"); + w = gtkpod_builder_xml_get_widget(prefbuilder, "pm_ascend"); break; case SORT_DESCENDING: - w = gtkpod_xml_get_widget(pref_xml, "pm_descend"); + w = gtkpod_builder_xml_get_widget(prefbuilder, "pm_descend"); break; case SORT_NONE: - w = gtkpod_xml_get_widget(pref_xml, "pm_none"); + w = gtkpod_builder_xml_get_widget(prefbuilder, "pm_none"); break; } if (w) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), TRUE); - if ((w = gtkpod_xml_get_widget(pref_xml, "pm_cfg_case_sensitive"))) { + if ((w = gtkpod_builder_xml_get_widget(prefbuilder, "pm_cfg_case_sensitive"))) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), prefs_get_int("pm_case_sensitive")); } - glade_xml_signal_autoconnect(pref_xml); + gtk_builder_connect_signals(prefbuilder, NULL); + g_object_unref(prefbuilder); return notebook; } diff --git a/po/POTFILES.in b/po/POTFILES.in index 908f512..25df1d2 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -85,7 +85,7 @@ plugins/photo_editor/photo_editor_context_menu.c [type: gettext/ini]plugins/photo_editor/photo_editor.plugin.in plugins/photo_editor/plugin.c plugins/playlist_display/display_playlists.c -plugins/playlist_display/playlist_display.glade +[type: gettext/glade]plugins/playlist_display/playlist_display.xml plugins/playlist_display/playlist_display_actions.c plugins/playlist_display/playlist_display_context_menu.c [type: gettext/ini]plugins/playlist_display/playlist_display.plugin.in diff --git a/po/POTFILES.skip b/po/POTFILES.skip index 229c16e..f43e79b 100644 --- a/po/POTFILES.skip +++ b/po/POTFILES.skip @@ -6,7 +6,7 @@ data/glade/exporter.xml data/glade/media_player.glade data/glade/mserv.xml data/glade/photo_editor.glade -data/glade/playlist_display.glade +data/glade/playlist_display.xml data/glade/repository_editor.glade data/glade/sorttab_display.xml data/glade/track_display.xml ------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb _______________________________________________ gtkpod-cvs2 mailing list gtkpod-cvs2@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2