Commit 8d1283f2 authored by Jim Krehl's avatar Jim Krehl
Browse files

Merged trunk into version-2 branch: svn merge -r 91:145 trunk .

svn path=/branches/version-2/; revision=146
parent 95ae615a
2007-01-25 Scott Reeves <sreeves@novell.com>
* control-center/src/control-center.c: - stop CC common tasks from
launching twic
* main-menu/src/system-tile.c: - patch from Otavio Salvador for
system-tile's launched twice.
* libslab/application-tile.c: - When no GenericName is present then
just show and center the Name
2007-01-19 Scott Reeves <sreeves@novell.com>
* control-center/src/control-center.c
* libslab/app-shell.c:
Check the exit arg when exiting via keyboard and context menu
2007-01-18 Rodrigo Moya <rodrigo@gnome-db.org>
* libslab/app-shell.c (main_delete_callback): return FALSE if we
want the window destroyed.
2007-01-17 Rodrigo Moya <rodrigo@gnome-db.org>
* libslab/app-shell.[ch] (appshelldata_new): added an argument to
specify whether to exit the program when the shell window is closed.
* application-browser/src/application-browser.c (main): pass FALSE,
don't quit.
* control-center/src/control-center.c (main): pass TRUE, quit when
closed.
(handle_static_action_clicked): check for the exit_on_close flag if
the GConf key is set.
2007-01-12 Scott Reeves <sreeves@novell.com>
* libslab/libslab.pc.in:
Clean up the .pc file
......
......@@ -39,7 +39,7 @@ After installing a "Gnome Main Menu" applet should appear in your "Add to panel
Contributing
------------
This project can be found in gnome-cvs under the module named "slab". To
This project can be found in gnome svn under the module named "gnome-main-menu". To
access this see: http://developer.gnome.org/tools/cvs.html. Feel free to send
any patches to anyone in the MAINTAINERS file.
......
......@@ -84,7 +84,7 @@ main (int argc, char *argv[])
config->max_items = get_slab_gconf_int (NEW_APPS_MAX_ITEMS);
config->name = _("New Applications");
AppShellData *app_data = appshelldata_new (
"applications.menu", config, APPLICATION_BROWSER_PREFIX, GTK_ICON_SIZE_DND);
"applications.menu", config, APPLICATION_BROWSER_PREFIX, GTK_ICON_SIZE_DND, FALSE);
generate_categories (app_data);
layout_shell (app_data, _("Filter"), _("Groups"), _("Application Actions"), NULL, NULL);
......
......@@ -51,6 +51,7 @@ static GSList *get_actions_list ();
static GSList *
get_actions_list ()
{
GSList *l;
GSList *key_list;
GSList *actions_list = NULL;
AppAction *action;
......@@ -62,12 +63,13 @@ get_actions_list ()
return NULL;
}
for (; key_list; key_list = key_list->next)
for (l = key_list; l != NULL; l = l->next)
{
gchar *entry = (gchar *) key_list->data;
gchar *entry = (gchar *) l->data;
gchar **temp;
action = g_new (AppAction, 1);
gchar **temp = g_strsplit (entry, CONTROL_CENTER_ACTIONS_SEPARATOR, 2);
temp = g_strsplit (entry, CONTROL_CENTER_ACTIONS_SEPARATOR, 2);
action->name = g_strdup (temp[0]);
if ((action->item = load_desktop_item_from_unknown (temp[1])) == NULL)
{
......@@ -75,19 +77,23 @@ get_actions_list ()
}
else
{
actions_list = g_slist_append (actions_list, action);
actions_list = g_slist_prepend (actions_list, action);
}
g_strfreev (temp);
g_free (entry);
}
g_slist_free (key_list);
return actions_list;
return g_slist_reverse (actions_list);
}
void
handle_static_action_clicked (Tile * tile, TileEvent * event, gpointer data)
{
if (event->type == TILE_EVENT_ACTIVATED_DOUBLE_CLICK)
return;
gchar *temp;
AppShellData *app_data = (AppShellData *) data;
......@@ -97,7 +103,12 @@ handle_static_action_clicked (Tile * tile, TileEvent * event, gpointer data)
temp = g_strdup_printf("%s%s", app_data->gconf_prefix, EXIT_SHELL_ON_STATIC_ACTION);
if (get_slab_gconf_bool(temp))
gtk_main_quit ();
{
if (app_data->exit_on_close)
gtk_main_quit ();
else
hide_shell (app_data);
}
g_free (temp);
}
......@@ -107,6 +118,9 @@ main (int argc, char *argv[])
BonoboApplication *bonobo_app = NULL;
gboolean hidden = FALSE;
gchar * startup_id;
AppShellData *app_data;
GSList *actions;
GnomeProgram *program;
#ifdef ENABLE_NLS
bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
......@@ -127,7 +141,7 @@ main (int argc, char *argv[])
}
startup_id = g_strdup (g_getenv (DESKTOP_STARTUP_ID));
gnome_program_init ("Gnome Control Center", "0.1", LIBGNOMEUI_MODULE,
program = gnome_program_init ("GNOME Control Center", "0.1", LIBGNOMEUI_MODULE,
argc, argv, NULL, NULL);
if (apss_already_running (argc, argv, &bonobo_app, "GNOME-NLD-ControlCenter", startup_id))
......@@ -138,11 +152,11 @@ main (int argc, char *argv[])
exit (1);
}
AppShellData *app_data = appshelldata_new (
"preferences.menu", NULL, CONTROL_CENTER_PREFIX, GTK_ICON_SIZE_DIALOG);
app_data = appshelldata_new (
"preferences.menu", NULL, CONTROL_CENTER_PREFIX, GTK_ICON_SIZE_DIALOG, TRUE);
generate_categories (app_data);
GSList *actions = get_actions_list ();
actions = get_actions_list ();
layout_shell (app_data, _("Filter"), _("Groups"), _("Common Tasks"), actions,
handle_static_action_clicked);
......
......@@ -207,7 +207,10 @@ main_keypress_callback (GtkWidget * widget, GdkEventKey * event, AppShellData *
((event->keyval == GDK_w || event->keyval == GDK_W) && (event->state & GDK_CONTROL_MASK)) ||
((event->keyval == GDK_q || event->keyval == GDK_Q) && (event->state & GDK_CONTROL_MASK)))
{
hide_shell (app_data);
if (app_data->exit_on_close)
gtk_main_quit ();
else
hide_shell (app_data);
return TRUE;
}
return FALSE;
......@@ -216,6 +219,12 @@ main_keypress_callback (GtkWidget * widget, GdkEventKey * event, AppShellData *
static gboolean
main_delete_callback (GtkWidget * widget, GdkEvent * event, AppShellData * app_data)
{
if (app_data->exit_on_close)
{
gtk_main_quit ();
return FALSE;
}
hide_shell (app_data);
return TRUE; /* stop the processing of this event */
}
......@@ -812,7 +821,7 @@ gmenu_tree_changed_callback (GMenuTree * old_tree, gpointer user_data)
AppShellData *
appshelldata_new (const gchar * menu_name, NewAppConfig * new_apps, const gchar * gconf_keys_prefix,
GtkIconSize icon_size)
GtkIconSize icon_size, gboolean exit_on_close)
{
AppShellData *app_data = g_new0 (AppShellData, 1);
app_data->gconf_prefix = gconf_keys_prefix;
......@@ -820,6 +829,7 @@ appshelldata_new (const gchar * menu_name, NewAppConfig * new_apps, const gchar
app_data->menu_name = menu_name;
app_data->icon_size = icon_size;
app_data->stop_incremental_relayout = TRUE;
app_data->exit_on_close = exit_on_close;
return app_data;
}
......@@ -1298,7 +1308,12 @@ handle_launcher_single_clicked (Tile * launcher, gpointer data)
gconf_key = g_strdup_printf ("%s%s", app_data->gconf_prefix, EXIT_SHELL_ON_ACTION_START);
if (get_slab_gconf_bool (gconf_key))
hide_shell (app_data);
{
if (app_data->exit_on_close)
gtk_main_quit ();
else
hide_shell (app_data);
}
g_free (gconf_key);
}
......@@ -1337,7 +1352,12 @@ handle_menu_action_performed (Tile * launcher, TileEvent * event, TileAction * a
if (temp)
{
if (get_slab_gconf_bool (temp))
hide_shell (app_data);
{
if (app_data->exit_on_close)
gtk_main_quit ();
else
hide_shell (app_data);
}
g_free (temp);
}
else
......
......@@ -92,6 +92,8 @@ typedef struct _AppShellData
gboolean filtered_out_everything;
GtkWidget *filtered_out_everything_widget;
GtkLabel *filtered_out_everything_widget_label;
gboolean exit_on_close;
} AppShellData;
typedef struct
......@@ -120,7 +122,7 @@ void generate_categories (AppShellData * app_data);
/* If new_apps is NULL then the new applications category is not created */
AppShellData *appshelldata_new (const gchar * menu_name, NewAppConfig * new_apps,
const gchar * gconf_keys_prefix, GtkIconSize icon_size);
const gchar * gconf_keys_prefix, GtkIconSize icon_size, gboolean exit_on_close);
void layout_shell (AppShellData * app_data, const gchar * filter_title, const gchar * groups_title,
const gchar * actions_title, GSList * actions,
......
......@@ -280,7 +280,10 @@ application_tile_setup (ApplicationTile *this)
atk_object_set_description (accessible, desc);
header = create_header (name);
subheader = create_subheader (desc);
if (desc) /*if no GenericName then just show and center the Name */
subheader = create_subheader (desc);
else
subheader = NULL;
context_menu = GTK_MENU (gtk_menu_new ());
......
......@@ -294,7 +294,7 @@ tile_leave (GtkButton * widget)
static void
tile_clicked (GtkButton * widget)
{
TileEvent *tile_event;
TileEvent *tile_event;
tile_event = g_new0 (TileEvent, 1);
tile_event->type = TILE_EVENT_ACTIVATED_DOUBLE_CLICK;
......
2007-01-24 Kjartan Maraas <kmaraas@gnome.org>
* nb.po: Updated Norwegian bokmål translation.
2007-01-23 David Lodge <dave@cirt.net>
* en_GB.po: Updated English (British) translation
2007-01-21 Josep Puigdemont i Casamajó <josep.puigdemont@gmail.com>
* ca.po: Updated Catalan translation by
Silvia Miranda <silvia.mirandasanchez2@mail.dcu.ie>.
2007-01-12 Daniel Nylander <po@danielnylander.se>
* sv.po: Updated Swedish translation.
2006-12-28 Adam Weinberger <adamw@gnome.org>
* POTFILES.in: Added missing file.
* en_CA.po: Added Canadian English translation.
2006-12-13 Pema Geyleg <pgeyleg@gmail.com>
* dz.po: Added Dzongkha Translation.
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment