[Goodies-commits] r2693 - xfce4-quicklauncher-plugin/trunk/panel-plugin
Masse Nicolas
bountykiller at xfce.org
Fri Apr 20 22:10:49 CEST 2007
Author: bountykiller
Date: 2007-04-20 20:10:49 +0000 (Fri, 20 Apr 2007)
New Revision: 2693
Modified:
xfce4-quicklauncher-plugin/trunk/panel-plugin/callbacks.c
xfce4-quicklauncher-plugin/trunk/panel-plugin/main.c
Log:
+ fix a bug when the icon was changed
Modified: xfce4-quicklauncher-plugin/trunk/panel-plugin/callbacks.c
===================================================================
--- xfce4-quicklauncher-plugin/trunk/panel-plugin/callbacks.c 2007-04-20 18:36:01 UTC (rev 2692)
+++ xfce4-quicklauncher-plugin/trunk/panel-plugin/callbacks.c 2007-04-20 20:10:49 UTC (rev 2693)
@@ -355,7 +355,7 @@
sel = gtk_tree_view_get_selection( GTK_TREE_VIEW(_dlg->treeview1) );
if ( gtk_tree_selection_get_selected(sel, &treemodel, &iter) )
{
- gtk_tree_model_get(treemodel, &iter, 2, &launcher, -1);
+ gtk_tree_model_get(treemodel, &iter, 3, &launcher, -1);
if ( (gint)icon_id == XFCE_ICON_CATEGORY_EXTERN )
{
gtk_window_set_modal(GTK_WINDOW(_icon_window), FALSE);
@@ -395,7 +395,8 @@
treemodel = gtk_tree_view_get_model(GTK_TREE_VIEW(_dlg->treeview1));
gtk_list_store_insert(GTK_LIST_STORE(treemodel), &iter, INT_MAX); //INT_MAX must be enough ;-)
pixbuf = xfce_themed_icon_load_category(XFCE_ICON_CATEGORY_UNKNOWN, 16);
- gtk_list_store_set(GTK_LIST_STORE(treemodel), &iter, 0, pixbuf, 1, NULL ,2, (gpointer)launcher, -1);
+ gtk_list_store_set(GTK_LIST_STORE(treemodel), &iter, 0, pixbuf, 1, NULL,
+ 2, NULL, 3, (gpointer)launcher, -1);
UNREF(pixbuf);
quicklauncher_empty_widgets(_dlg->quicklauncher);
quicklauncher_add_element(_dlg->quicklauncher, launcher);
Modified: xfce4-quicklauncher-plugin/trunk/panel-plugin/main.c
===================================================================
--- xfce4-quicklauncher-plugin/trunk/panel-plugin/main.c 2007-04-20 18:36:01 UTC (rev 2692)
+++ xfce4-quicklauncher-plugin/trunk/panel-plugin/main.c 2007-04-20 20:10:49 UTC (rev 2693)
@@ -408,14 +408,15 @@
}
/* -------------------------------------------------------------------- *
- * Launcher Interface *
+ * Launcher Interface *
* -------------------------------------------------------------------- */
//TO DO: support icon by name
GdkPixbuf *
_create_pixbuf(gint id, const gchar* name, gint size)
{
- GdkPixbuf *pixbuf;
+ DBG ("id: %d" , id);
+ GdkPixbuf *pixbuf = NULL;
if(id != XFCE_ICON_CATEGORY_EXTERN)
pixbuf = xfce_themed_icon_load_category(id, size);
else
@@ -536,7 +537,8 @@
launcher->hbox = g_object_ref(gtk_hbox_new(FALSE, 0));
gtk_container_add(GTK_CONTAINER(launcher->box), launcher->hbox);
DBG ("create launcher %s with box %d", launcher->command, (gint)launcher->box);
- launcher->image = g_object_ref(gtk_image_new());
+ //launcher->image = g_object_ref(gtk_image_new());
+ launcher->image = gtk_image_new();
gtk_box_pack_start(GTK_BOX(launcher->hbox), launcher->image, FALSE, FALSE, 0);
launcher_update_icon(launcher, launcher->quicklauncher->icon_size);
gtk_widget_show(launcher->image);
@@ -558,6 +560,8 @@
launcher = g_new0 (t_launcher, 1);
if(name)
launcher->name= g_strdup(name);
+ else
+ launcher->name= NULL;
if(command)
launcher->command = g_strdup(command);
else launcher->command = NULL;
More information about the Goodies-commits
mailing list