diff options
author | Zhai Edwin <edwin.zhai@intel.com> | 2010-08-03 15:32:55 +0800 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-06 18:28:26 +0100 |
commit | 56bbb27bb06e0e4ad501259631acf9422db12482 (patch) | |
tree | d9844e56b27df2fe6ccc8698e4567736144ea944 /meta/packages/pcmanfm/files/owl-window-menu.patch | |
parent | 2c2e5dc14677c0c10cf1eaedb7207be58a2ec4cb (diff) | |
download | openembedded-core-contrib-56bbb27bb06e0e4ad501259631acf9422db12482.tar.gz |
pcmanfm: re-update it to 0.9.7
Previous update was reverted due to some reason. This commit re-introduce the
update after following efforts:
* rebase owl-window-menu.patch - Translate the menu of gtk_ui_manager to
original gtk menu, to enable owl feature.
* fix cross-compile issue - 0.9.7 use a temp binary, built from its own source
code, to optimize the data file size. This binary for target can't run on
build system. As this size optimization only gain 0.2K improvement for one
data file(used for about dialog), disable it to work around this issue. No
perf drop found after this fix.
Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
Diffstat (limited to 'meta/packages/pcmanfm/files/owl-window-menu.patch')
-rw-r--r-- | meta/packages/pcmanfm/files/owl-window-menu.patch | 112 |
1 files changed, 68 insertions, 44 deletions
diff --git a/meta/packages/pcmanfm/files/owl-window-menu.patch b/meta/packages/pcmanfm/files/owl-window-menu.patch index d11140cf42..f3d4e61a22 100644 --- a/meta/packages/pcmanfm/files/owl-window-menu.patch +++ b/meta/packages/pcmanfm/files/owl-window-menu.patch @@ -1,56 +1,80 @@ -Index: pcmanfm-0.5/configure.in +0.9.7 use a new menu bar from gtk_ui_manager, so need a translation here to +enable owl menu + +Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> + +Index: pcmanfm-0.9.7/configure.ac =================================================================== ---- pcmanfm-0.5.orig/configure.in -+++ pcmanfm-0.5/configure.in -@@ -25,6 +25,12 @@ - gtk_modules="gtk+-2.0 >= 2.6.0 \ - gthread-2.0" +--- pcmanfm-0.9.7.orig/configure.ac 2010-07-27 10:28:12.000000000 +0800 ++++ pcmanfm-0.9.7/configure.ac 2010-07-27 18:03:42.000000000 +0800 +@@ -70,6 +70,8 @@ + + gtk_modules="gtk+-2.0 >= 2.16.0" PKG_CHECK_MODULES(GTK, [$gtk_modules]) -+ -+OWL_CFLAGS="" +OWL_LIBS="-lowl" -+GTK_CFLAGS="$GTK_CFLAGS $OWL_CFLAGS" +GTK_LIBS="$GTK_LIBS $OWL_LIBS" -+ AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) -Index: pcmanfm-0.5/src/main-window.c -=================================================================== ---- pcmanfm-0.5.orig/src/main-window.c -+++ pcmanfm-0.5/src/main-window.c -@@ -534,9 +534,7 @@ - main_window->splitter_pos = app_settings.splitter_pos; - - /* Create menu bar */ -- main_window->menu_bar = gtk_menu_bar_new (); -- gtk_box_pack_start ( GTK_BOX ( main_window->main_vbox ), -- main_window->menu_bar, FALSE, FALSE, 0 ); -+ main_window->menu_bar = gtk_menu_new (); - - main_window->accel_group = gtk_accel_group_new (); - fm_side_pane_menu[ 0 ].ret = ( GtkWidget** ) (GtkWidget*) & main_window->open_side_pane_menu; -Index: pcmanfm-0.5/src/main.c +Index: pcmanfm-0.9.7/src/main-win.c =================================================================== ---- pcmanfm-0.5.orig/src/main.c -+++ pcmanfm-0.5/src/main.c -@@ -48,6 +48,8 @@ - - #include "desktop.h" +--- pcmanfm-0.9.7.orig/src/main-win.c 2010-07-27 10:56:08.000000000 +0800 ++++ pcmanfm-0.9.7/src/main-win.c 2010-07-27 17:28:59.000000000 +0800 +@@ -36,6 +36,8 @@ + #include "main-win.h" + #include "pref.h" +#include "libowl/owlwindowmenu.h" + - typedef enum{ - CMD_OPEN = 1, - CMD_OPEN_TAB, -@@ -320,6 +322,10 @@ - gtk_window_maximize( GTK_WINDOW( main_window ) ); - } - gtk_widget_show ( GTK_WIDGET( main_window ) ); -+ gtk_widget_show_all (main_window->menu_bar); -+ owl_set_window_menu (GTK_WINDOW(main_window), -+ GTK_MENU(main_window->menu_bar)); -+ - return main_window; + static void fm_main_win_finalize (GObject *object); + G_DEFINE_TYPE(FmMainWin, fm_main_win, GTK_TYPE_WINDOW); + +@@ -466,9 +468,27 @@ + fm_main_win_chdir(win, path); } - #if 0 + ++/* Transfer gtk_ui_manager menubar to gtk menubar */ ++static GtkWidget * ui_menubar_to_menu(GtkWidget *menubar) ++{ ++ GtkWidget *main_menu; ++ GList *iter; ++ ++ main_menu = gtk_menu_new(); ++ ++ for ( iter = gtk_container_get_children(GTK_CONTAINER(menubar)); ++ iter; ++ iter = g_list_next(iter) ) ++ { ++ GtkWidget *menu = GTK_WIDGET(iter->data); ++ gtk_widget_reparent(menu, main_menu); ++ } ++ return main_menu; ++} ++ + static void fm_main_win_init(FmMainWin *self) + { +- GtkWidget *vbox, *menubar, *toolitem, *scroll; ++ GtkWidget *vbox, *menubar, *owl_menubar, *toolitem, *scroll; + GtkUIManager* ui; + GtkActionGroup* act_grp; + GtkAction* act; +@@ -537,7 +557,6 @@ + + self->popup = gtk_ui_manager_get_widget(ui, "/popup"); + +- gtk_box_pack_start( (GtkBox*)vbox, menubar, FALSE, TRUE, 0 ); + gtk_box_pack_start( (GtkBox*)vbox, self->toolbar, FALSE, TRUE, 0 ); + + /* load bookmarks menu */ +@@ -586,6 +605,11 @@ + gtk_container_add( (GtkContainer*)self, vbox ); + gtk_widget_show_all(vbox); + ++ owl_menubar = ui_menubar_to_menu(menubar); ++ gtk_widget_show_all (owl_menubar); ++ owl_set_window_menu (GTK_WINDOW(self), ++ GTK_MENU(owl_menubar)); ++ + /* create new tab */ + fm_main_win_add_tab(self, fm_path_get_home()); + gtk_widget_grab_focus(self->folder_view); |