aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-03-24 20:39:56 -0500
committerTed Gould <ted@gould.cx>2010-03-24 20:39:56 -0500
commitf4b7762bd69eae3c23b3b76fae07d1ff69965020 (patch)
tree4e89d0841207f59dfb6bedf4d4df3b46b338fb4b
parentf4e0f72761eeef5bf7cc250cc55813796c795d64 (diff)
downloadayatana-indicator-messages-f4b7762bd69eae3c23b3b76fae07d1ff69965020.tar.gz
ayatana-indicator-messages-f4b7762bd69eae3c23b3b76fae07d1ff69965020.tar.bz2
ayatana-indicator-messages-f4b7762bd69eae3c23b3b76fae07d1ff69965020.zip
Checking to see if we've seen the application before choosing whether we have the name or the setup string.
-rw-r--r--src/launcher-menu-item.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/launcher-menu-item.c b/src/launcher-menu-item.c
index 279d167..ae14828 100644
--- a/src/launcher-menu-item.c
+++ b/src/launcher-menu-item.c
@@ -31,6 +31,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include "launcher-menu-item.h"
#include "dbus-data.h"
#include "default-applications.h"
+#include "seen-db.h"
enum {
NAME_CHANGED,
@@ -163,7 +164,14 @@ launcher_menu_item_new (const gchar * desktop_file)
app info that we've parsed */
g_debug("\tName: %s", launcher_menu_item_get_name(self));
- const gchar * default_name = get_default_name(desktop_file);
+ const gchar * default_name = NULL;
+
+ if (seen_db_seen(desktop_file)) {
+ default_name = get_default_name(desktop_file);
+ } else {
+ default_name = get_default_setup(desktop_file);
+ }
+
if (default_name == NULL) {
dbusmenu_menuitem_property_set(DBUSMENU_MENUITEM(self), DBUSMENU_MENUITEM_PROP_LABEL, launcher_menu_item_get_name(self));
} else {