Commit 3dbf0efa authored by Jiri (George) Lebl's avatar Jiri (George) Lebl Committed by George Lebl

a bit of cleanup. use gnome-globe.png for links and not netscape.png,

Sat Dec 02 23:16:29 2000  George Lebl <jirka@5z.com>

	* launcher.c, panel.c: a bit of cleanup. use gnome-globe.png for
	  links and not netscape.png, accept info:, man: and ghelp: as
	  url's as well.

	* panel.c: when a panel is removed the applets are removed cleanly,
	  so that we don't get the "reload this applet" dialog in that case.
parent 29f4c385
Sat Dec 02 23:16:29 2000 George Lebl <jirka@5z.com>
* launcher.c, panel.c: a bit of cleanup. use gnome-globe.png for
links and not netscape.png, accept info:, man: and ghelp: as
url's as well.
* panel.c: when a panel is removed the applets are removed cleanly,
so that we don't get the "reload this applet" dialog in that case.
Sat Dec 02 21:49:34 2000 George Lebl <jirka@5z.com>
* session.c: apparently reading /proc/apm can crash on some
......
Sat Dec 02 23:16:29 2000 George Lebl <jirka@5z.com>
* launcher.c, panel.c: a bit of cleanup. use gnome-globe.png for
links and not netscape.png, accept info:, man: and ghelp: as
url's as well.
* panel.c: when a panel is removed the applets are removed cleanly,
so that we don't get the "reload this applet" dialog in that case.
Sat Dec 02 21:49:34 2000 George Lebl <jirka@5z.com>
* session.c: apparently reading /proc/apm can crash on some
......
......@@ -65,12 +65,12 @@ launch (Launcher *launcher, int argc, char *argv[])
return;
}
if(item->type && strcmp(item->type,"URL")==0) {
if (item->type && strcmp (item->type, "URL") == 0) {
char *s;
s = g_strjoinv(" ",item->exec);
gnome_url_show(s);
g_free(s);
} else if(item->type && strcmp(item->type,"PanelApplet")==0) {
s = g_strjoinv (" ",item->exec);
gnome_url_show (s);
g_free (s);
} else if (item->type && strcmp (item->type, "PanelApplet") == 0) {
char *goad_id;
goad_id = get_applet_goad_id_from_dentry (item);
......@@ -83,9 +83,10 @@ launch (Launcher *launcher, int argc, char *argv[])
g_warning (_("Can't get goad_id from desktop entry!"));
}
g_free(goad_id);
} else
g_free (goad_id);
} else {
gnome_desktop_entry_launch_with_args (item,argc,argv);
}
if(global_config.drawer_auto_close) {
GtkWidget *parent =
......
......@@ -572,6 +572,25 @@ panel_move_timeout(gpointer data)
return FALSE;
}
static void
clean_kill_applets (PanelWidget *panel)
{
GList *li;
for(li = panel->applet_list; li != NULL; li = li->next) {
AppletData *ad = li->data;
AppletInfo *info =
gtk_object_get_data (GTK_OBJECT (ad->applet),
"applet_info");
if (info->type == APPLET_EXTERN) {
Extern *ext = info->data;
ext->clean_remove = TRUE;
} else if (info->type == APPLET_SWALLOW) {
Swallow *swallow = info->data;
swallow->clean_remove = TRUE;
}
}
}
static void
panel_destroy (GtkWidget *widget, gpointer data)
{
......@@ -582,6 +601,8 @@ panel_destroy (GtkWidget *widget, gpointer data)
panel = PANEL_WIDGET(BASEP_WIDGET(widget)->panel);
else if (IS_FOOBAR_WIDGET (widget))
panel = PANEL_WIDGET (FOOBAR_WIDGET (widget)->panel);
clean_kill_applets (panel);
kill_config_dialog(widget);
......@@ -877,9 +898,9 @@ extract_filename (const gchar* uri)
static void
drop_url(PanelWidget *panel, int pos, char *url)
{
char *p = g_strdup_printf(_("Open URL: %s"),url);
load_launcher_applet_from_info_url(url, p, url, "netscape.png",
panel, pos, TRUE);
char *p = g_strdup_printf (_("Open URL: %s"), url);
load_launcher_applet_from_info_url (url, p, url, "gnome-globe.png",
panel, pos, TRUE);
g_free(p);
}
......@@ -908,14 +929,20 @@ drop_urilist (PanelWidget *panel, int pos, char *urilist,
files = gnome_uri_list_extract_uris(urilist);
for(li = files; li; li = li->next) {
char *uri;
const char *mimetype;
char *filename;
if(strncmp(li->data, "http:", strlen("http:")) == 0 ||
strncmp(li->data, "https:", strlen("https:")) == 0 ||
strncmp(li->data, "ftp:", strlen("ftp:")) == 0 ||
strncmp(li->data, "gopher:", strlen("gopher:")) == 0) {
drop_url(panel,pos,li->data);
uri = li->data;
if (strncmp (uri, "http:", strlen ("http:")) == 0 ||
strncmp (uri, "https:", strlen ("https:")) == 0 ||
strncmp (uri, "ftp:", strlen ("ftp:")) == 0 ||
strncmp (uri, "gopher:", strlen ("gopher:")) == 0 ||
strncmp (uri, "ghelp:", strlen ("ghelp:")) == 0 ||
strncmp (uri, "man:", strlen ("man:")) == 0 ||
strncmp (uri, "info:", strlen ("info:")) == 0) {
drop_url (panel, pos, uri);
continue;
}
......
Markdown is supported
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