50
50
(G_TYPE_CHECK_INSTANCE_TYPE((o), FISH_TYPE_APPLET))
51
51
52
52
#define FISH_ICON "mate-panel-fish"
53
+ #define FISH_RESOURCE_PATH "/org/mate/panel/applet/fish/"
53
54
54
55
#define FISH_SCHEMA "org.mate.panel.applet.fish"
55
56
#define FISH_NAME_KEY "name"
@@ -378,7 +379,6 @@ static void chooser_preview_update(GtkFileChooser* file_chooser, gpointer data)
378
379
static void display_preferences_dialog (GtkAction * action , FishApplet * fish )
379
380
{
380
381
GtkBuilder * builder ;
381
- GError * error ;
382
382
GtkWidget * button ;
383
383
GtkFileFilter * filter ;
384
384
GtkWidget * chooser_preview ;
@@ -393,14 +393,7 @@ static void display_preferences_dialog(GtkAction* action, FishApplet* fish)
393
393
394
394
builder = gtk_builder_new ();
395
395
gtk_builder_set_translation_domain (builder , GETTEXT_PACKAGE );
396
-
397
- error = NULL ;
398
- gtk_builder_add_from_file (builder , FISH_BUILDERDIR "/fish.ui" , & error );
399
- if (error ) {
400
- g_warning ("Error loading preferences: %s" , error -> message );
401
- g_error_free (error );
402
- return ;
403
- }
396
+ gtk_builder_add_from_resource (builder , FISH_RESOURCE_PATH "fish.ui" , NULL );
404
397
405
398
fish -> preferences_dialog = GTK_WIDGET (gtk_builder_get_object (builder , "fish_preferences_dialog" ));
406
399
@@ -1716,7 +1709,6 @@ static gboolean fish_applet_fill(FishApplet* fish)
1716
1709
{
1717
1710
MatePanelApplet * applet = (MatePanelApplet * ) fish ;
1718
1711
GtkActionGroup * action_group ;
1719
- gchar * ui_path ;
1720
1712
1721
1713
fish -> orientation = mate_panel_applet_get_orient (applet );
1722
1714
@@ -1751,9 +1743,9 @@ static gboolean fish_applet_fill(FishApplet* fish)
1751
1743
fish_menu_verbs ,
1752
1744
G_N_ELEMENTS (fish_menu_verbs ),
1753
1745
fish );
1754
- ui_path = g_build_filename ( FISH_MENU_UI_DIR , "fish-menu.xml" , NULL );
1755
- mate_panel_applet_setup_menu_from_file ( applet , ui_path , action_group );
1756
- g_free ( ui_path );
1746
+ mate_panel_applet_setup_menu_from_resource ( applet ,
1747
+ FISH_RESOURCE_PATH "fish-menu.xml" ,
1748
+ action_group );
1757
1749
1758
1750
if (mate_panel_applet_get_locked_down (applet )) {
1759
1751
GtkAction * action ;
0 commit comments