packages: lxlauncher/lxlauncher-0.2.1-fix-segfault.patch (NEW), lxlauncher/...

witekfl witekfl at pld-linux.org
Sun Aug 1 21:12:57 CEST 2010


Author: witekfl                      Date: Sun Aug  1 19:12:57 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- new
- added a patch from Mandriva SVN

---- Files affected:
packages/lxlauncher:
   lxlauncher-0.2.1-fix-segfault.patch (NONE -> 1.1)  (NEW), lxlauncher.spec (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/lxlauncher/lxlauncher-0.2.1-fix-segfault.patch
diff -u /dev/null packages/lxlauncher/lxlauncher-0.2.1-fix-segfault.patch:1.1
--- /dev/null	Sun Aug  1 21:12:57 2010
+++ packages/lxlauncher/lxlauncher-0.2.1-fix-segfault.patch	Sun Aug  1 21:12:52 2010
@@ -0,0 +1,124 @@
+--- src/lxlauncher.c	2009-07-07 15:48:19.000000000 +0300
++++ src/lxlauncher.c.new	2010-06-09 21:09:24.000000000 +0300
+@@ -311,6 +311,7 @@
+ {
+     // Dirty hacks used to force pseudo-transparent background
+     gtk_widget_queue_draw( data->table );
++    return TRUE;
+ }
+ 
+ // Dirty hacks used to reduce unnecessary redrew during scroll
+@@ -662,18 +663,38 @@
+     gchar *file;
+ 
+     file = g_build_filename(user_dir, name, NULL);
+-    if (g_file_test(file, G_FILE_TEST_EXISTS) == TRUE) {
+-	return file;
+-    }
++    if (g_file_test(file, G_FILE_TEST_EXISTS) == TRUE)
++    	return file;
+     free(file);
+ 
+     for (dir = system_dirs; *dir; ++dir ) {
+-	file = g_build_filename(*dir, name, NULL);
+-	if (g_file_test(file, G_FILE_TEST_EXISTS) == TRUE) {
+-	    return file;
+-	}
+-	free(file);
++        file = g_build_filename(*dir, name, NULL);
++        if (g_file_test(file, G_FILE_TEST_EXISTS) == TRUE)
++            return file;
++	    free(file);
++    }
++    return NULL;
++}
++
++static void on_menu_cache_reload(MenuCache* mc, gpointer user_data)
++{
++    GMainLoop* mainloop = (GMainLoop*)user_data;
++    g_main_loop_quit(mainloop);
++}
++
++MenuCache* _menu_cache_lookup_sync( const char* menu_name )
++{
++    MenuCache* mc = menu_cache_lookup(menu_name);
++    /* ensure that the menu cache is loaded */
++    if(! menu_cache_get_root_dir(mc)) /* if it's not yet loaded */
++    {
++        GMainLoop* mainloop = g_main_loop_new(NULL, FALSE);
++        gpointer notify_id = menu_cache_add_reload_notify(mc, on_menu_cache_reload, mainloop);
++        g_main_loop_run(mainloop);
++        g_main_loop_unref(mainloop);
++        menu_cache_remove_reload_notify(mc, notify_id);
+     }
++    return mc;
+ }
+ 
+ int main(int argc, char** argv)
+@@ -695,13 +716,14 @@
+     GError *error = NULL;
+     gchar *config_file = get_xdg_config_file(CONFIG_FILE);
+     if (config_file &&
+-	g_key_file_load_from_file(key_file,
+-				  config_file,
+-				  G_KEY_FILE_NONE,
+-				  &error)) {
+-	printf("Loaded %s\n", config_file);
+-    } else {
+-	perror("Error loading " CONFIG_FILE);
++        g_key_file_load_from_file(key_file,
++                      config_file,
++                      G_KEY_FILE_NONE,
++                      &error)) {
++    	printf("Loaded %s\n", config_file);
++    }
++    else {
++    	perror("Error loading " CONFIG_FILE);
+     }
+     if (config_file)
+ 	free(config_file);
+@@ -711,21 +733,23 @@
+     // Add application specific properties
+     gtk_settings_install_property(g_param_spec_boolean("lxlauncher-enable-key",
+                             _("Enable key navigation"),
+-                            _("Allow users to use up/down/left/right/tab/enter keys to operate the lxlaucher"),
++                            _("Allow users to use up/down/left/right/tab/enter keys to operate the lxlauncher"),
+                             FALSE,GTK_ARG_READWRITE));
+     // set up themes for notebook
+     gchar* gtkrc_file = get_xdg_config_file("lxlauncher/gtkrc");
+     gtk_rc_parse(gtkrc_file);
+     if (gtkrc_file) {
+-	free(gtkrc_file);
++    	free(gtkrc_file);
+     }
+ 
+     button_size = g_key_file_get_integer(key_file, "Main", "BUTTON_SIZE", NULL);
+     img_size = g_key_file_get_integer(key_file, "Main", "IMG_SIZE", NULL);
+ 
+     // to prevent from going without configure file
+-    if(!button_size) button_size = BUTTON_SIZE_FALLBACK;
+-    if(!img_size) img_size = IMG_SIZE_FALLBACK;
++    if(!button_size)
++        button_size = BUTTON_SIZE_FALLBACK;
++    if(!img_size)
++        img_size = IMG_SIZE_FALLBACK;
+ 
+     icon_size = gtk_icon_size_register( "ALIcon", img_size, img_size );
+ 
+@@ -756,9 +780,14 @@
+     gtk_container_add( (GtkContainer*)main_window, notebook );
+ 
+     g_setenv("XDG_MENU_PREFIX", "lxlauncher-", TRUE);
+-    menu_tree = menu_cache_lookup( "applications.menu" );
++    menu_tree = _menu_cache_lookup_sync( "applications.menu" );
++    if(!menu_tree)
++    {
++        g_print("Unable to load application menu\n");
++        return 1;
++    }
++    root_dir = menu_cache_item_ref(menu_cache_get_root_dir( menu_tree ));
+     reload_notify_id = menu_cache_add_reload_notify( menu_tree, on_menu_tree_changed, NULL );
+-    root_dir = menu_cache_ref(menu_cache_get_root_dir( menu_tree ));
+ 
+     create_notebook_pages();
+ 

================================================================
Index: packages/lxlauncher/lxlauncher.spec
diff -u /dev/null packages/lxlauncher/lxlauncher.spec:1.1
--- /dev/null	Sun Aug  1 21:12:57 2010
+++ packages/lxlauncher/lxlauncher.spec	Sun Aug  1 21:12:52 2010
@@ -0,0 +1,59 @@
+# $Revision$, $Date$
+Summary:	lxauncher
+Name:		lxlauncher
+Version:	0.2.1
+Release:	1
+License:	GPL v3
+Group:		X11/Applications
+Source0:	http://downloads.sourceforge.net/lxde/%{name}-%{version}.tar.gz
+# Source0-md5:	5dbe6076eb1a411278e1fc2bccf2d75d
+# From Mandriva
+Patch0:		%{name}-0.2.1-fix-segfault.patch
+URL:		http://www.lxde.org/
+BuildRequires:	gettext-devel
+BuildRequires:	gtk+2-devel >= 2:2.12.0
+BuildRequires:	intltool >= 0.40.0
+BuildRequires:	pkgconfig
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+LXLauncher is an open source clone of Asus launcher for EeePC.
+It outperformes the original launcher developed by Xandros.
+
+%prep
+%setup -q
+%patch0 -p0
+
+%build
+%configure
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+%find_lang %{name}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files -f %{name}.lang
+%defattr(644,root,root,755)
+%doc AUTHORS README NEWS
+%{_sysconfdir}/xdg/lxlauncher
+%{_sysconfdir}/xdg/menus/lxlauncher-applications.menu
+%attr(755,root,root) %{_bindir}/lxlauncher
+%{_datadir}/desktop-directories/*directory
+
+%define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1  2010/08/01 19:12:52  witekfl
+- new
+- added a patch from Mandriva SVN
+
================================================================


More information about the pld-cvs-commit mailing list