1
1

1999-01-30 Miguel de Icaza <miguel@nuclecu.unam.mx>

* gtkedit/gtkedit.c: Hack to get a string defined in a macro into
	the catalog file.

1999-02-02  Tuomas Kuosmanen  <tigert@gimp.org>

	* new_icons/gnome-core.png: New icon for core files. Someone
	please add the code part :)
Этот коммит содержится в:
Miguel de Icaza 1999-02-05 23:59:13 +00:00
родитель 0dc1ef5771
Коммит e3ab7e0c88
8 изменённых файлов: 90 добавлений и 37 удалений

Просмотреть файл

@ -1,3 +1,13 @@
1999-02-05 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gnome-file-property-dialog.c
(gnome_file_property_dialog_finalize): Release all of the
resources allocated (metadata routines alwayre return an allocated
block of memory).
* gdnd.c (drop_url_on_directory): Better set the icon-filename
metadata entry instead of hard coding it.
1999-02-05 Jonathan Blandford <jrb@redhat.com>
* gcmd.c (gnome_reverse_selection_cmd_panel): new function -- does

Просмотреть файл

@ -394,7 +394,7 @@ reload_desktop_icons (int user_pos, int xpos, int ypos)
full_name = g_concat_dir_and_file (desktop_directory, dirent->d_name);
have_pos = gmeta_get_icon_pos (full_name, &x, &y);
if (!gnome_metadata_get (full_name, "desktop-url", &size, &desktop_url))
if (gnome_metadata_get (full_name, "desktop-url", &size, &desktop_url) != 0)
desktop_url = NULL;
if (have_pos) {
@ -1359,14 +1359,13 @@ desktop_icon_info_new (char *filename, char *url, int user_pos, int auto_pos, in
if (url){
dii->url = g_strdup (url);
icon_im = gicon_get_url_image ();
caption = url;
} else {
dii->url = NULL;
icon_im = gicon_get_icon_for_file_speed (desktop_directory, fe, FALSE);
caption = filename;
}
icon_im = gicon_get_icon_for_file_speed (desktop_directory, fe, FALSE);
dii->dicon = desktop_icon_new (icon_im, caption);
dii->filename = g_strdup (filename);
dii->selected = FALSE;

Просмотреть файл

@ -268,12 +268,19 @@ drop_url_on_directory (GdkDragContext *context, GtkSelectionData *selection_data
f = fopen (template, "w");
if (f) {
char *icon;
fprintf (f, "URL: %s\n", selection_data->data);
fclose (f);
gnome_metadata_set (template, "desktop-url",
strlen (selection_data->data) + 1,
selection_data->data);
icon = g_concat_dir_and_file (ICONDIR, "gnome-http-url.png");
gnome_metadata_set (template, "icon-filename",
strlen (icon) + 1, icon);
g_free (icon);
}
}

Просмотреть файл

@ -31,7 +31,6 @@ static GdkImlibImage *icon_view_sock;
static GdkImlibImage *icon_view_char_dev;
static GdkImlibImage *icon_view_block_dev;
static GdkImlibImage *icon_view_stalled;
static GdkImlibImage *icon_view_url;
/* Our UID and GID */
static uid_t our_uid;
@ -70,7 +69,6 @@ gicon_init (void)
icon_view_char_dev = gicon_stock_load ("i-chardev.png");
icon_view_block_dev = gicon_stock_load ("i-blockdev.png");
icon_view_stalled = gicon_stock_load ("i-stalled.png");
icon_view_url = gicon_stock_load ("gnome-http-url.png");
if (icon_view_directory == NULL ||
icon_view_dirclosed == NULL ||
@ -81,7 +79,6 @@ gicon_init (void)
icon_view_sock == NULL ||
icon_view_char_dev == NULL ||
icon_view_block_dev == NULL ||
icon_view_url == NULL ||
icon_view_stalled == NULL){
message (1, _("Error"), _("Default set of icons not found, check your installation"));
exit (1);
@ -169,12 +166,6 @@ gnome_file_entry_color (file_entry *fe)
return icon_view_regular;
}
GdkImlibImage *
gicon_get_url_image ()
{
return icon_view_url;
}
/**
* gicon_get_icon_for_file:
*

Просмотреть файл

@ -5,7 +5,6 @@ GdkImlibImage *gicon_get_by_filename (char *fname);
GdkImlibImage *gicon_stock_load (char *basename);
GdkImlibImage *gicon_get_icon_for_file (char *directory, file_entry *fe);
GdkImlibImage *gicon_get_icon_for_file_speed (char *directory, file_entry *fe, gboolean do_quick);
GdkImlibImage *gicon_get_url_image ();
char *gicon_image_to_name (GdkImlibImage *image);
void gicon_init (void);

Просмотреть файл

@ -110,6 +110,19 @@ gnome_file_property_dialog_finalize (GtkObject *object)
g_free (gfpd->file_name);
if (gfpd->im)
gdk_imlib_destroy_image (gfpd->im);
if (gfpd->fm_open)
g_free (gfpd->fm_open);
if (gfpd->fm_view)
g_free (gfpd->fm_view);
if (gfpd->edit)
g_free (gfpd->edit);
if (gfpd->drop_target)
g_free (gfpd->drop_target);
if (gfpd->icon_filename)
g_free (gfpd->icon_filename);
if (gfpd->desktop_url)
g_free (gfpd->desktop_url);
(* GTK_OBJECT_CLASS (parent_class)->finalize) (object);
}
@ -270,7 +283,17 @@ create_general_properties (GnomeFilePropertyDialog *fp_dlg)
return vbox;
}
static GtkWidget *
create_url_properties (GnomeFilePropertyDialog *fp_dlg)
{
GtkWidget *table, *label;
table = gtk_table_new (0, 0, 0);
label = gtk_label_new (_("URL"));
}
/* Settings Pane */
static void
@ -329,6 +352,13 @@ switch_metadata_box (GnomeFilePropertyDialog *fp_dlg)
if (NULL == fp_dlg->prop1_label)
return;
fp_dlg->changing = TRUE;
if (fp_dlg->desktop_url){
gtk_entry_set_text (GTK_ENTRY (fp_dlg->desktop_entry), fp_dlg->desktop_url);
fp_dlg->changing = FALSE;
return;
}
if (fp_dlg->executable) {
gtk_label_set_text (GTK_LABEL (fp_dlg->prop1_label), "Drop Action");
gtk_label_set_text (GTK_LABEL (GTK_BIN (fp_dlg->prop1_cbox)->child), "Use default Drop Action options");
@ -887,7 +917,7 @@ init_metadata (GnomeFilePropertyDialog *fp_dlg)
gchar *mime_type;
gchar link_name[60];
gint n;
gchar *file_name;
gchar *file_name, *desktop_url;
if (gnome_metadata_get (fp_dlg->file_name, "fm-open", &size, &fp_dlg->fm_open) != 0)
gnome_metadata_get (fp_dlg->file_name, "open", &size, &fp_dlg->fm_open);
@ -921,6 +951,12 @@ init_metadata (GnomeFilePropertyDialog *fp_dlg)
gnome_metadata_get (fp_dlg->file_name, "icon-filename", &size, &fp_dlg->icon_filename);
if (fp_dlg->icon_filename)
g_print ("we have an icon-filename:%s:\n", fp_dlg->icon_filename);
if (gnome_metadata_get (fp_dlg->file_name, "desktop-url", &size, &desktop_url) == 0)
fp_dlg->desktop_url = desktop_url;
else
fp_dlg->desktop_url = NULL;
}
GtkWidget *
gnome_file_property_dialog_new (gchar *file_name, gboolean can_set_icon)
@ -957,22 +993,31 @@ gnome_file_property_dialog_new (gchar *file_name, gboolean can_set_icon)
/* and now, we set up the gui. */
notebook = gtk_notebook_new ();
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
create_general_properties (fp_dlg),
gtk_label_new (_("Statistics")));
new_page = create_settings_pane (fp_dlg);
if (new_page)
if (fp_dlg->desktop_url)
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
new_page,
gtk_label_new (_("Options")));
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
create_perm_properties (fp_dlg),
gtk_label_new (_("Permissions")));
gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (fp_dlg)->vbox),
notebook, TRUE, TRUE, 0);
title_string = g_strconcat (rindex (file_name, '/') + 1, _(" Properties"), NULL);
gtk_window_set_title (GTK_WINDOW (fp_dlg), title_string);
g_free (title_string);
create_url_properties (fp_dlg),
gtk_label_new (_("URL")));
else {
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
create_general_properties (fp_dlg),
gtk_label_new (_("Statistics")));
new_page = create_settings_pane (fp_dlg);
if (new_page)
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
new_page,
gtk_label_new (_("Options")));
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
create_perm_properties (fp_dlg),
gtk_label_new (_("Permissions")));
gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (fp_dlg)->vbox),
notebook, TRUE, TRUE, 0);
title_string = g_strconcat (rindex (file_name, '/') + 1, _(" Properties"), NULL);
gtk_window_set_title (GTK_WINDOW (fp_dlg), title_string);
g_free (title_string);
}
gnome_dialog_append_button ( GNOME_DIALOG(fp_dlg),
GNOME_STOCK_BUTTON_OK);
gnome_dialog_append_button ( GNOME_DIALOG(fp_dlg),

Просмотреть файл

@ -68,7 +68,8 @@ struct _GnomeFilePropertyDialog
GtkWidget *prop1_label, *prop1_entry, *prop1_cbox;
GtkWidget *prop2_label, *prop2_entry, *prop2_cbox, *prop2_hline;
GtkWidget *button;
GtkWidget *desktop_entry;
gchar *fm_open;
gchar *fm_view;
gchar *drop_target;
@ -78,6 +79,7 @@ struct _GnomeFilePropertyDialog
gchar *mime_drop_target;
gchar *mime_edit;
gchar *icon_filename;
gchar *desktop_url;
gboolean can_set_icon;
GdkImlibImage *im;

Просмотреть файл

@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 1999-02-04 19:44-0600\n"
"POT-Creation-Date: 1999-02-05 17:17-0600\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -181,7 +181,7 @@ msgstr ""
msgid "Enter extra arguments:"
msgstr ""
#: gnome/gdesktop.c:347 gnome/gdesktop.c:1490
#: gnome/gdesktop.c:347 gnome/gdesktop.c:1500
msgid "Warning"
msgstr ""
@ -190,16 +190,16 @@ msgstr ""
msgid "Could not open %s; will not have desktop icons"
msgstr ""
#: gnome/gdesktop.c:1456
#: gnome/gdesktop.c:1466
msgid "Trashcan"
msgstr ""
#. Create the link to the user's home directory so that he will have an icon
#: gnome/gdesktop.c:1486
#: gnome/gdesktop.c:1496
msgid "Home directory"
msgstr ""
#: gnome/gdesktop.c:1491
#: gnome/gdesktop.c:1501
#, c-format
msgid "Could not symlink %s to %s; will not have initial desktop icons."
msgstr ""
@ -366,11 +366,11 @@ msgid ""
"%s"
msgstr ""
#: gnome/gicon.c:83 gnome/gtools.c:50
#: gnome/gicon.c:86 gnome/gtools.c:50
msgid "Error"
msgstr ""
#: gnome/gicon.c:83
#: gnome/gicon.c:86
msgid "Default set of icons not found, check your installation"
msgstr ""