...
 
Commits (8)
......@@ -9,4 +9,3 @@ Jaap A. Haitsma
Jonh Wendell
William Jon McCann
Larry Ewing
Roy Marples
......@@ -38,7 +38,7 @@ PKG_CHECK_MODULES(GLADE, libglade-2.0)
AC_SUBST(GLADE_CFLAGS)
AC_SUBST(GLADE_LIBS)
PKG_CHECK_MODULES(LIBSLAB, [ $COMMON_MODULES gnome-desktop-2.0 librsvg-2.0 libgnome-menu pango ])
PKG_CHECK_MODULES(LIBSLAB, [ $COMMON_MODULES gnome-desktop-2.0 librsvg-2.0 libgnome-menu pango eel-2.0 ])
AC_SUBST(LIBSLAB_CFLAGS)
AC_SUBST(LIBSLAB_LIBS)
......
......@@ -150,11 +150,18 @@ application_tile_new_full (const gchar *desktop_item_id,
desktop_item = load_desktop_item_from_unknown (desktop_item_id);
if (desktop_item)
if (
desktop_item &&
gnome_desktop_item_get_entry_type (desktop_item) == GNOME_DESKTOP_ITEM_TYPE_APPLICATION
)
uri = gnome_desktop_item_get_location (desktop_item);
if (! desktop_item || ! uri)
if (! uri) {
if (desktop_item)
gnome_desktop_item_unref (desktop_item);
return NULL;
}
this = g_object_new (APPLICATION_TILE_TYPE, "tile-uri", uri, NULL);
priv = APPLICATION_TILE_GET_PRIVATE (this);
......
......@@ -826,75 +826,43 @@ load_recent_store (BookmarkAgent *this)
{
BookmarkAgentPrivate *priv = PRIVATE (this);
#ifdef USE_GTK_RECENT_MANAGER
GtkRecentInfo *info;
gboolean include;
#else
EggRecentModel *model;
EggRecentItem *info;
#endif
GBookmarkFile *store;
GList *items;
GList *items_ordered = NULL;
gchar **uris = NULL;
GList *items_ordered = NULL;
BookmarkItem *item;
GList *node;
gboolean include;
gint i;
GList *node;
#ifdef USE_GTK_RECENT_MANAGER
items = gtk_recent_manager_get_items (gtk_recent_manager_get_default ());
#else
model = egg_recent_model_new (EGG_RECENT_MODEL_SORT_MRU);
if (priv->type == BOOKMARK_STORE_RECENT_APPS)
egg_recent_model_set_filter_groups (model, "recently-used-apps", NULL);
else
egg_recent_model_set_filter_groups (model, NULL);
items = egg_recent_model_get_list (model);
#endif
store = g_bookmark_file_new ();
g_bookmark_file_load_from_file (store, priv->store_path, NULL);
for (node = items; node; node = node->next) {
#ifdef USE_GTK_RECENT_MANAGER
info = (GtkRecentInfo *) node->data;
uris = g_bookmark_file_get_uris (store, NULL);
for (i = 0; uris && uris [i]; ++i) {
if (priv->type == BOOKMARK_STORE_RECENT_APPS)
include = gtk_recent_info_has_group (info, "recently-used-apps");
include = g_bookmark_file_has_group (store, uris [i], "recently-used-apps", NULL);
else
include = ! gtk_recent_info_get_private_hint (info);
include = ! g_bookmark_file_get_is_private (store, uris [i], NULL);
if (include) {
item = g_new0 (BookmarkItem, 1);
item->uri = g_strdup (gtk_recent_info_get_uri (info));
item->mime_type = g_strdup (gtk_recent_info_get_mime_type (info));
item->mtime = gtk_recent_info_get_modified (info);
item->uri = g_strdup (uris [i]);
item->mime_type = g_bookmark_file_get_mime_type (store, uris [i], NULL);
item->mtime = g_bookmark_file_get_modified (store, uris [i], NULL);
items_ordered = g_list_insert_sorted (items_ordered, item, recent_item_mru_comp_func);
}
gtk_recent_info_unref (info);
#else
info = (EggRecentItem *) node->data;
item = g_new0 (BookmarkItem, 1);
item->uri = egg_recent_item_get_uri (info);
item->mime_type = egg_recent_item_get_mime_type (info);
item->mtime = egg_recent_item_get_timestamp (info);
items_ordered = g_list_append (items_ordered, item);
egg_recent_item_unref (info);
#endif
}
g_list_free (items);
#ifndef USE_GTK_RECENT_MANAGER
g_object_unref (model);
#endif
g_strfreev (uris);
g_bookmark_file_free (store);
g_bookmark_file_free (priv->store);
priv->store = g_bookmark_file_new ();
......@@ -946,9 +914,8 @@ update_user_spec_path (BookmarkAgent *this)
if (use_user_path)
path = g_strdup (priv->user_store_path);
else {
else
path = find_package_data_file (priv->store_filename);
}
if (use_user_path)
status = BOOKMARK_STORE_USER;
......
......@@ -22,6 +22,7 @@
#include <glib/gi18n.h>
#include <string.h>
#include <eel/eel-alert-dialog.h>
#include <libgnomeui/gnome-icon-lookup.h>
#include <libgnomevfs/gnome-vfs.h>
#include <unistd.h>
......@@ -33,6 +34,7 @@
#define GCONF_SEND_TO_CMD_KEY "/desktop/gnome/applications/main-menu/file-area/file_send_to_cmd"
#define GCONF_ENABLE_DELETE_KEY_DIR "/apps/nautilus/preferences"
#define GCONF_ENABLE_DELETE_KEY GCONF_ENABLE_DELETE_KEY_DIR "/enable_delete"
#define GCONF_CONFIRM_DELETE_KEY GCONF_ENABLE_DELETE_KEY_DIR "/confirm_trash"
G_DEFINE_TYPE (DirectoryTile, directory_tile, NAMEPLATE_TILE_TYPE)
......@@ -558,12 +560,38 @@ move_to_trash_trigger (Tile *tile, TileEvent *event, TileAction *action)
static void
delete_trigger (Tile *tile, TileEvent *event, TileAction *action)
{
gchar *prompt;
GtkDialog *confirm_dialog;
gint result;
GnomeVFSURI *src_uri;
GList *list = NULL;
GnomeVFSResult retval;
if (GPOINTER_TO_INT (libslab_get_gconf_value (GCONF_CONFIRM_DELETE_KEY))) {
prompt = g_strdup_printf (
_("Are you sure you want to permanently delete \"%s\"?"),
DIRECTORY_TILE_GET_PRIVATE (tile)->basename);
confirm_dialog = GTK_DIALOG (eel_alert_dialog_new (
NULL, 0, GTK_MESSAGE_WARNING, GTK_BUTTONS_NONE,
prompt, _("If you delete an item, it is permanently lost.")));
gtk_dialog_add_button (confirm_dialog, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
gtk_dialog_add_button (confirm_dialog, GTK_STOCK_DELETE, GTK_RESPONSE_YES);
gtk_dialog_set_default_response (GTK_DIALOG (confirm_dialog), GTK_RESPONSE_YES);
result = gtk_dialog_run (confirm_dialog);
gtk_widget_destroy (GTK_WIDGET (confirm_dialog));
g_free (prompt);
if (result != GTK_RESPONSE_YES)
return;
}
src_uri = gnome_vfs_uri_new (TILE (tile)->uri);
list = g_list_append (list, src_uri);
......@@ -644,5 +672,5 @@ static void
disown_spawned_child (gpointer user_data)
{
setsid ();
setpgid (0, 0);
setpgrp ();
}
......@@ -22,6 +22,7 @@
#include <glib/gi18n.h>
#include <string.h>
#include <eel/eel-alert-dialog.h>
#include <libgnomeui/gnome-icon-lookup.h>
#include <libgnomevfs/gnome-vfs-ops.h>
#include <libgnomevfs/gnome-vfs-uri.h>
......@@ -38,6 +39,7 @@
#define GCONF_SEND_TO_CMD_KEY "/desktop/gnome/applications/main-menu/file-area/file_send_to_cmd"
#define GCONF_ENABLE_DELETE_KEY_DIR "/apps/nautilus/preferences"
#define GCONF_ENABLE_DELETE_KEY GCONF_ENABLE_DELETE_KEY_DIR "/enable_delete"
#define GCONF_CONFIRM_DELETE_KEY GCONF_ENABLE_DELETE_KEY_DIR "/confirm_trash"
G_DEFINE_TYPE (DocumentTile, document_tile, NAMEPLATE_TILE_TYPE)
......@@ -796,12 +798,37 @@ delete_trigger (Tile *tile, TileEvent *event, TileAction *action)
{
DocumentTilePrivate *priv = DOCUMENT_TILE_GET_PRIVATE (tile);
gchar *prompt;
GtkDialog *confirm_dialog;
gint result;
GnomeVFSURI *src_uri;
GList *list = NULL;
GnomeVFSResult retval;
if (GPOINTER_TO_INT (libslab_get_gconf_value (GCONF_CONFIRM_DELETE_KEY))) {
prompt = g_strdup_printf (
_("Are you sure you want to permanently delete \"%s\"?"), priv->basename);
confirm_dialog = GTK_DIALOG (eel_alert_dialog_new (
NULL, 0, GTK_MESSAGE_WARNING, GTK_BUTTONS_NONE,
prompt, _("If you delete an item, it is permanently lost.")));
gtk_dialog_add_button (confirm_dialog, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
gtk_dialog_add_button (confirm_dialog, GTK_STOCK_DELETE, GTK_RESPONSE_YES);
gtk_dialog_set_default_response (GTK_DIALOG (confirm_dialog), GTK_RESPONSE_YES);
result = gtk_dialog_run (confirm_dialog);
gtk_widget_destroy (GTK_WIDGET (confirm_dialog));
g_free (prompt);
if (result != GTK_RESPONSE_YES)
return;
}
src_uri = gnome_vfs_uri_new (TILE (tile)->uri);
list = g_list_append (list, src_uri);
......
......@@ -84,6 +84,7 @@ GnomeDesktopItem *
libslab_gnome_desktop_item_new_from_unknown_id (const gchar *id)
{
GnomeDesktopItem *item;
gchar *basename;
GError *error = NULL;
......@@ -118,6 +119,21 @@ libslab_gnome_desktop_item_new_from_unknown_id (const gchar *id)
error = NULL;
}
basename = g_strrstr (id, "/");
if (basename) {
basename++;
item = gnome_desktop_item_new_from_basename (basename, 0, &error);
if (! error)
return item;
else {
g_error_free (error);
error = NULL;
}
}
return NULL;
}
......
......@@ -148,43 +148,56 @@ load_desktop_item_from_gconf_key (const gchar * key)
}
GnomeDesktopItem *
load_desktop_item_from_unknown (const gchar * id)
load_desktop_item_from_unknown (const gchar *id)
{
GnomeDesktopItem *item;
GError *error;
gchar *basename;
GError *error = NULL;
error = NULL;
item = gnome_desktop_item_new_from_uri (id, 0, &error);
if (!error)
if (! error)
return item;
else
{
else {
g_error_free (error);
error = NULL;
}
item = gnome_desktop_item_new_from_file (id, 0, &error);
if (!error)
if (! error)
return item;
else
{
else {
g_error_free (error);
error = NULL;
}
item = gnome_desktop_item_new_from_basename (id, 0, &error);
if (!error)
if (! error)
return item;
else
{
else {
g_error_free (error);
error = NULL;
}
basename = g_strrstr (id, "/");
if (basename) {
basename++;
item = gnome_desktop_item_new_from_basename (basename, 0, &error);
if (! error)
return item;
else {
g_error_free (error);
error = NULL;
}
}
return NULL;
}
......
......@@ -40,7 +40,7 @@
#define TIMEOUT_KEY_DIR "/apps/procman"
#define TIMEOUT_KEY "/apps/procman/disks_interval"
#define FILE_BROWSER_GCONF_KEY "/desktop/gnome/applications/main-menu/file_browser"
#define SYSTEM_MONITOR_GCONF_KEY "/desktop/gnome/applications/main-menu/system_monitor"
G_DEFINE_TYPE (HardDriveStatusTile, hard_drive_status_tile, NAMEPLATE_TILE_TYPE)
......@@ -459,7 +459,7 @@ open_hard_drive_tile (Tile * tile, TileEvent * event, TileAction * action)
gchar *fb_ditem_id;
fb_ditem_id = (gchar *) libslab_get_gconf_value (FILE_BROWSER_GCONF_KEY);
fb_ditem_id = (gchar *) libslab_get_gconf_value (SYSTEM_MONITOR_GCONF_KEY);
if (! fb_ditem_id)
fb_ditem_id = g_strdup ("nautilus.desktop");
......
......@@ -1008,10 +1008,30 @@ item_to_dir_tile (BookmarkItem *item, gpointer data)
static Tile *
item_to_system_tile (BookmarkItem *item, gpointer data)
{
Tile *tile;
gchar *basename;
if (app_is_in_blacklist (item->uri))
return NULL;
return TILE (system_tile_new (item->uri, item->title));
tile = TILE (system_tile_new (item->uri, item->title));
if (tile)
return tile;
basename = g_strrstr (item->uri, "/");
if (basename)
basename++;
else
basename = item->uri;
if (! libslab_strcmp (basename, "control-center.desktop"))
tile = TILE (system_tile_new ("gnomecc.desktop", item->title));
else if (! libslab_strcmp (basename, "zen-installer.desktop"))
tile = TILE (system_tile_new ("package-manager.desktop", item->title));
return tile;
}
static BookmarkItem *
......@@ -1605,8 +1625,6 @@ panel_button_clicked_cb (GtkButton *button, gpointer user_data)
GtkToggleButton *toggle = GTK_TOGGLE_BUTTON (button);
DoubleClickDetector *detector;
GTimeVal t_curr;
guint32 t_curr_ms;
gboolean visible;
......@@ -1614,14 +1632,11 @@ panel_button_clicked_cb (GtkButton *button, gpointer user_data)
detector = DOUBLE_CLICK_DETECTOR (
g_object_get_data (G_OBJECT (toggle), "double-click-detector"));
g_get_current_time (& t_curr);
t_curr_ms = 1000 * t_curr.tv_sec + t_curr.tv_usec / 1000;
visible = GTK_WIDGET_VISIBLE (priv->slab_window);
if (! double_click_detector_is_double_click (detector, t_curr_ms, TRUE)) {
if (! double_click_detector_is_double_click (detector, gtk_get_current_event_time (), TRUE)) {
if (! visible)
gtk_window_present_with_time (GTK_WINDOW (priv->slab_window), t_curr_ms);
gtk_window_present_with_time (GTK_WINDOW (priv->slab_window), gtk_get_current_event_time ());
else
gtk_widget_hide (priv->slab_window);
......
......@@ -35,6 +35,8 @@ typedef struct
{
DBusGConnection *nm_conn;
DBusGProxy *nm_proxy;
guint state_curr;
} NetworkStatusAgentPrivate;
#define NETWORK_STATUS_AGENT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NETWORK_STATUS_AGENT_TYPE, NetworkStatusAgentPrivate))
......@@ -88,6 +90,7 @@ network_status_agent_init (NetworkStatusAgent * agent)
priv->nm_conn = NULL;
priv->nm_proxy = NULL;
priv->state_curr = 0;
}
NetworkStatusAgent *
......@@ -324,8 +327,15 @@ nm_get_device_info (NetworkStatusAgent * agent, DBusGProxy * device)
static void
nm_state_change_cb (DBusGProxy * proxy, guint state, gpointer user_data)
{
g_signal_emit (NETWORK_STATUS_AGENT (user_data),
network_status_agent_signals[STATUS_CHANGED], 0);
NetworkStatusAgent *this = NETWORK_STATUS_AGENT (user_data);
NetworkStatusAgentPrivate *priv = NETWORK_STATUS_AGENT_GET_PRIVATE (this);
if (priv->state_curr == state)
return;
priv->state_curr = state;
g_signal_emit (this, network_status_agent_signals [STATUS_CHANGED], 0);
}
static DBusHandlerResult
......@@ -460,4 +470,3 @@ gtop_get_first_active_device_info ()
g_strfreev (networks);
return info;
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
# translation of gnome-main-menu.po to
# translation of gnome-main-menu.hu.po to
# translation of hu.po to
# This file is distributed under the same license as the PACKAGE package.
......@@ -7,17 +8,17 @@
# Gabor Kelemen <kelemeng@gnome.hu>, 2007.
msgid ""
msgstr ""
"Project-Id-Version: gnome-main-menu.hu\n"
"Project-Id-Version: gnome-main-menu\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 17:53+0100\n"
"PO-Revision-Date: 2007-02-09 15:29+0100\n"
"Last-Translator: Gabor Kelemen <kelemeng@gnome.hu>\n"
"Language-Team: Hungarian <gnome@gnome.hu>\n"
"PO-Revision-Date: 2007-04-19 15:07+0200\n"
"Last-Translator: Kalman Kemenczy <kkemenczy@novell.com>\n"
"Language-Team: <hu@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ../application-browser/etc/application-browser.desktop.in.in.h:1
#: ../application-browser/src/application-browser.c:93
......@@ -144,8 +145,7 @@ msgstr ""
"Adminisztrátori beállítások;YaST.desktop]"
#: ../control-center/etc/control-center.schemas.in.h:14
msgid ""
"if true, the control-center will close when a \"Common Task\" is activated"
msgid "if true, the control-center will close when a \"Common Task\" is activated"
msgstr ""
"ha igaz, a vezérlőközpont automatikusan bezárul egy \"Gyakori feladat\" "
"aktiválásakor"
......@@ -324,8 +324,7 @@ msgstr "Nincsenek csoportok beállítva a következő URI könyvjelzőjéhez: \"
#: ../libslab/eggbookmarkfile.c:3634 ../libslab/eggbookmarkfile.c:3775
#, c-format
msgid "No application with name '%s' registered a bookmark for '%s'"
msgstr ""
"Nincs \"%s\" nevű alkalmazás regisztrálva a következő könyvjelzőjéhez: \"%s\""
msgstr "Nincs \"%s\" nevű alkalmazás regisztrálva a következő könyvjelzőjéhez: \"%s\""
#: ../libslab/search-bar.c:255
msgid "Find Now"
......@@ -386,10 +385,8 @@ msgid ".desktop path for the application browser"
msgstr ".desktop elérési út az alkalmazásböngészőhöz"
#: ../main-menu/etc/slab.schemas.in.in.h:6
msgid ""
"Location of the system-wide directory in which startup programs are found."
msgstr ""
"A rendszerszintű könyvtár helye, amelyben az indítóprogramok találhatók."
msgid "Location of the system-wide directory in which startup programs are found."
msgstr "A rendszerszintű könyvtár helye, amelyben az indítóprogramok találhatók."
#: ../main-menu/etc/slab.schemas.in.in.h:7
msgid ""
......@@ -427,8 +424,7 @@ msgstr ""
msgid ""
"This is the command to execute when the \"Send To...\" menu item is "
"activated."
msgstr ""
"Ez a parancs kerül végrehajtásra a \"Küldés...\" menüelem aktiválásakor."
msgstr "Ez a parancs kerül végrehajtásra a \"Küldés...\" menüelem aktiválásakor."
#: ../main-menu/etc/slab.schemas.in.in.h:12
msgid ""
......@@ -453,8 +449,7 @@ msgstr ""
#: ../main-menu/etc/slab.schemas.in.in.h:15
msgid "User autostart program drop dir (within the home dir)"
msgstr ""
"Felhasználói automatikus indítási programkönyvtár (a saját könyvtáron belül)"
msgstr "Felhasználói automatikus indítási programkönyvtár (a saját könyvtáron belül)"
#: ../main-menu/etc/slab.schemas.in.in.h:16
msgid "command to uninstall packages"
......@@ -529,8 +524,7 @@ msgstr ""
msgid ""
"determines the minimum number of items in the \"recent\" section of the file-"
"area."
msgstr ""
"megadja az elemek legkisebb számát a file-area \"legutóbbi\" szakaszában."
msgstr "megadja az elemek legkisebb számát a file-area \"legutóbbi\" szakaszában."
#: ../main-menu/etc/slab.schemas.in.in.h:25
msgid "determines which types of files to display in the file area"
......@@ -764,11 +758,11 @@ msgstr "Kedvenc helyek"
#: ../main-menu/src/slab-window.glade.h:8
msgid "More Applications..."
msgstr "További alkalmazás..."
msgstr "További alkalmazások..."
#: ../main-menu/src/slab-window.glade.h:9
msgid "More Documents..."
msgstr "További dokumentum..."
msgstr "További dokumentumok..."
#: ../main-menu/src/slab-window.glade.h:10
msgid "More Places..."
......@@ -810,3 +804,4 @@ msgstr "Dokumentum hozzáadása a Kedvencekhez"
#: ../nautilus-main-menu/nautilus-main-menu.c:139
msgid "Remove the current document from favorites"
msgstr "Dokumentum eltávolítása a Kedvencek közül"
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.