maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Maemo 5] Catorise: auto-sort applications menu (https://talk.maemo.org/showthread.php?t=40265)

DaSilva 2010-01-16 12:31

Re: Catorise: auto-sort applications menu
 
What do I have to add to a .desktop file to add it to a specific category in the menu?

Categories=Network;

Would this be enough to put a shortcut in the Network menu (using http://standards.freedesktop.org/men...egory-registry for other categories)? Because I have also found a X-Maemo-Category line in a .desktop file.
How can I update the menu without (un)installing anything or rebooting?
Thanks in advance.

atunguyd 2010-01-16 13:37

Re: Catorise: auto-sort applications menu
 
Jaffa,

I can confirm that the problem with freeciv has been fixed.

Thanks

Jaffa 2010-01-16 13:56

Re: Catorise: auto-sort applications menu
 
v0.0.5 is now in extras-devel and contains a workaround for #8111: Phone, Conversations, Calendar and Email won't appear in the "All" section.

Quote:

Originally Posted by DaSilva (Post 476044)
What do I have to add to a .desktop file to add it to a specific category in the menu?

Categories=Network;

Would this be enough to put a shortcut in the Network menu[?]

Yup. Catorise uses the first valid freedesktop.org category if defined in the .desktop file in preference to the Section of the package from which it was installed. Since there's such a close alignment between the freedesktop.org categories and the Maemo package sections, I'd recommend not having them wildly different in your packages!

b666m 2010-01-16 14:23

Re: Catorise: auto-sort applications menu
 
nice work!

everything's fine now in the latest version :D

fabien 2010-01-16 22:49

Re: Catorise: auto-sort applications menu
 
I have installed the version 0.0.3 and have the following issue when running:

Nokia-N900-42-11:~# /opt/catorise/catorise
cp: cannot stat '/usr/share/themes/alpha/backgrounds/app_install_network.png': No such file or directory
cp: cannot stat '/usr/share/themes/alpha/backgrounds/app_install_multimedia.png': No such file or directory
cp: cannot stat '/usr/share/themes/alpha/backgrounds/app_install_games.png': No such file or directory
cp: cannot stat '/usr/share/themes/alpha/backgrounds/app_install_system.png': No such file or directory
cp: cannot stat '/usr/share/themes/alpha/backgrounds/app_install_education.png': No such file or directory
cp: cannot stat '/usr/share/themes/alpha/backgrounds/app_install_desktop.png': No such file or directory
cp: cannot stat '/usr/share/themes/alpha/backgrounds/app_install_office.png': No such file or directory
cp: cannot stat '/usr/share/themes/alpha/backgrounds/app_install_navigation.png': No such file or directory
cp: cannot stat '/usr/share/themes/alpha/backgrounds/app_install_utilities.png': No such file or directory
cp: cannot stat '/usr/share/themes/alpha/backgrounds/app_install_science.png': No such file or directory
cp: cannot stat '/usr/share/themes/alpha/backgrounds/app_install_graphics.png': No such file or directory
cp: cannot stat '/usr/share/themes/alpha/backgrounds/app_install_other.png': No such file or directory
cp: cannot stat '/usr/share/themes/alpha/backgrounds/app_install_ovi.png': No such file or directory
cp: cannot stat '/usr/share/themes/alpha/backgrounds/app_install_development.png': No such file or directory
cp: cannot stat '/usr/share/themes/alpha/backgrounds/app_install_all.png': No such file or directory


Obviously the icone of the directories are blue
Is there anything obvious that I'm missing ?

Jaffa 2010-01-16 23:15

Re: Catorise: auto-sort applications menu
 
Quote:

Originally Posted by fabien (Post 477058)
cp: cannot stat '/usr/share/themes/alpha/backgrounds/app_install_network.png': No such file or directory

What version of Maemo are you using? (Settings > About Product)
Have you done any customisations manually, or using particular software?
Are you using a custom theme? If so, which one?

fabien 2010-01-16 23:42

Re: Catorise: auto-sort applications menu
 
maemo5
version: 1.2009.42-11.203.2

(this is displayed in the shell :) )

I was using Digital nature but reverted to default theme: Nokia Nseries.
I have installed few applications games & networks app mainly but nothing which modify nokia theme settings

romanianusa 2010-01-17 00:42

Re: Catorise: auto-sort applications menu
 
So in the future version...is there an option to opening up a program of some sort and edit the category and icons the way you want it?? Because i don't know how to get into the root and do it from there.

Jaffa 2010-01-17 08:08

Re: Catorise: auto-sort applications menu
 
Quote:

Originally Posted by fabien (Post 477168)
maemo5
version: 1.2009.42-11.203.2

Right, that answers the question :-)

The Application Manager icons were introduced in 1.2009.44-x; so I need to add a dependency on PR1.0.1 or above. In other words, you have three options:
  1. Update your firmware to PR1.1, or at least PR1.0.1. All the cool kids are doing it.
  2. Live with blue squares.
  3. Source some icons with the filenames above to put in /usr/share/icons/hicolor/64x64/hildon. Theoretically, I could ship some with Catorise, but I'm not sure I want to (I can't ship the Nokia icons, after all).

Quote:

(this is displayed in the shell :) )
Firmware updates don't necessarily update the hostname :-)

qwerty12 2010-01-17 11:27

Re: Catorise: auto-sort applications menu
 
Quote:

Originally Posted by qwerty12 (Post 470727)
Status area plugin? :p (Yes, I know...)

OK, it turns out I wasn't joking... :p

This thing is hackish, but works beautifully:

gcc --shared theme-updater-object.c `pkg-config --cflags --libs libhildondesktop-1` -Wall -o theme-updater-object.so
PHP Code:

/*
 * theme-updater-object
 *
 * Copyright (C) 2010 Faheem Pervez <Don't really feel like spam on this lovely morning>. All rights reserved.
 *
 * Licensed under:
 *
 *             DO WHAT THE **** YOU WANT TO PUBLIC LICENSE
 *                   Version 2, December 2004
 *
 *    Copyright (C) 2004 Sam Hocevar
 *    14 rue de Plaisance, 75014 Paris, France
 *    Everyone is permitted to copy and distribute verbatim or modified
 *    copies of this license document, and changing it is allowed as long
 *    as the name is changed.
 *
 *           DO WHAT THE **** YOU WANT TO PUBLIC LICENSE
 *  TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
 *
 *     0. You just DO WHAT THE **** YOU WANT TO. 
 *
 * This program is free software. It comes without any warranty, to
 * the extent permitted by applicable law. You can redistribute it
 * and/or modify it under the terms of the Do What The **** You Want
 * To Public License, Version 2, as published by Sam Hocevar. See
 * http://sam.zoy.org/wtfpl/COPYING for more details.
 *
 */

/* theme-updater-object.c */

#include <stdlib.h>
#include <glib.h>
#include <glib-object.h>
#include <libhildondesktop/libhildondesktop.h>

typedef struct
{
    
HDStatusPluginItem parent;
ThemeUpdaterObject;

typedef struct
{
    
HDStatusPluginItemClass parent_class;
ThemeUpdaterObjectClass;

HD_DEFINE_PLUGIN_MODULE (ThemeUpdaterObjecttheme_updater_objectHD_TYPE_STATUS_PLUGIN_ITEM)

static 
void theme_updater_object_class_init (ThemeUpdaterObjectClass *klass G_GNUC_UNUSED)
{
}

static 
void theme_updater_object_class_finalize (ThemeUpdaterObjectClass *klass G_GNUC_UNUSED)
{
}

static 
void on_theme_changed (GObject *obj G_GNUC_UNUSEDGParamSpec *pspec G_GNUC_UNUSEDgpointer user_data G_GNUC_UNUSED)
{
    static 
gboolean first_emission TRUE/* We recieve notification of the bloody theme changing twice! */

    
first_emission = !first_emission;

    if (!
first_emission)
        return;

    if (!
system ("pidof catorise"))
        return;

    
g_spawn_command_line_async ("/usr/bin/sudo /opt/catorise/catorise"NULL);
}

static 
void theme_updater_object_init (ThemeUpdaterObject *plugin G_GNUC_UNUSED)
{
    
g_signal_connect (G_OBJECT (gtk_settings_get_default ()), "notify::gtk-theme-name"G_CALLBACK (on_theme_changed), NULL);


As you will have realised, this does install as a status area plugin (which is why I derive from HDStatusPluginItem, instead) but displays nothing there. For this to work:

/etc/sudoers.d/catorise.sudoers:
Code:

user ALL = NOPASSWD: /opt/catorise/catorise
And then just do a plain "update-sudoers" as root.


All times are GMT. The time now is 07:06.

vBulletin® Version 3.8.8