[Goodies-commits] r1760 - in xfce4-quicklauncher-plugin/trunk: . panel-plugin po
Masse Nicolas
bountykiller at xfce.org
Thu Jul 13 00:02:01 CEST 2006
Author: bountykiller
Date: 2006-07-12 22:02:00 +0000 (Wed, 12 Jul 2006)
New Revision: 1760
Removed:
xfce4-quicklauncher-plugin/trunk/panel-plugin/Makefile
xfce4-quicklauncher-plugin/trunk/po/Makefile
Modified:
xfce4-quicklauncher-plugin/trunk/TODO
xfce4-quicklauncher-plugin/trunk/panel-plugin/callbacks.c
xfce4-quicklauncher-plugin/trunk/panel-plugin/main.c
Log:
backporting changes wich were still in berlios svn - Must fix FreeBSD4 stuff
Modified: xfce4-quicklauncher-plugin/trunk/TODO
===================================================================
--- xfce4-quicklauncher-plugin/trunk/TODO 2006-07-12 19:35:48 UTC (rev 1759)
+++ xfce4-quicklauncher-plugin/trunk/TODO 2006-07-12 22:02:00 UTC (rev 1760)
@@ -1,17 +1,8 @@
-For Version 1.0 (discontinued):
-***************
--allow manually config of nblines ==> done
--readd autosetting of nblines?
--translations (at least in french) ==>done
--use eventboxes and gdk_pixbuf instead of buttons ==> done
--make icons growing when the mouse is on ==>done
--add an icon for this plugin
--add tooltips ==>partially done
--add separators?
--any idea?
-
For Vesrion 2.0
-**************
+***************
-drag 'n drop support (with the app-finder for example)
-use more themed icons
-
+-replace xfce_icon_theme_load_category and friends
+-add an icon for this plugin
+-readd autosetting of nblines?
+-any idea?
Deleted: xfce4-quicklauncher-plugin/trunk/panel-plugin/Makefile
Modified: xfce4-quicklauncher-plugin/trunk/panel-plugin/callbacks.c
===================================================================
--- xfce4-quicklauncher-plugin/trunk/panel-plugin/callbacks.c 2006-07-12 19:35:48 UTC (rev 1759)
+++ xfce4-quicklauncher-plugin/trunk/panel-plugin/callbacks.c 2006-07-12 22:02:00 UTC (rev 1760)
@@ -491,8 +491,10 @@
void file_chooser_preview_img (FileChooser *chooser, gpointer user_data)
{
+ gchar *filename;
+
g_assert(GTK_IS_IMAGE(user_data));
- gchar *filename = file_chooser_get_filename(chooser);
+ filename = file_chooser_get_filename(chooser);
if(g_file_test(filename, G_FILE_TEST_IS_REGULAR))
{
file_chooser_set_preview_widget_active(chooser, TRUE);
Modified: xfce4-quicklauncher-plugin/trunk/panel-plugin/main.c
===================================================================
--- xfce4-quicklauncher-plugin/trunk/panel-plugin/main.c 2006-07-12 19:35:48 UTC (rev 1759)
+++ xfce4-quicklauncher-plugin/trunk/panel-plugin/main.c 2006-07-12 22:02:00 UTC (rev 1760)
@@ -32,7 +32,10 @@
#include <libxfcegui4/libxfcegui4.h>
#include <string.h>
+//TO DO:
+//+replace xfce_icon_theme_load_category and friends
+
/* Quicklauncher funcs */
void quicklauncher_free(t_quicklauncher *quicklauncher);
@@ -114,8 +117,8 @@
gboolean quicklauncher_set_size(XfcePanelPlugin *plugin, gint size,
t_quicklauncher *quicklauncher)
{
+ GList *liste;
DBG ("setting size %d", size);
- GList *liste;
quicklauncher->icon_size = (int) (0.75 * size/quicklauncher->nb_lines);
for(liste = quicklauncher->launchers;
liste ; liste = g_list_next(liste) )
@@ -147,8 +150,9 @@
void
quicklauncher_configure(XfcePanelPlugin *plugin, t_quicklauncher *quicklauncher)
{
+ t_qck_launcher_opt_dlg* dlg;
xfce_panel_plugin_block_menu(plugin);
- t_qck_launcher_opt_dlg* dlg = create_qck_launcher_dlg();
+ dlg = create_qck_launcher_dlg();
qck_launcher_opt_dlg_set_quicklauncher(quicklauncher);
gtk_dialog_run(GTK_DIALOG(dlg->dialog));
xfce_panel_plugin_unblock_menu(plugin);
@@ -200,10 +204,10 @@
void
quicklauncher_organize(t_quicklauncher *quicklauncher)
{
- DBG ("Organize quicklauncher");
gint i, j, launch_per_line, nb_lines;
GList *toplace;
+ DBG ("Organize quicklauncher");
g_assert( (!quicklauncher->table || GTK_IS_TABLE(quicklauncher->table)) && GTK_IS_CONTAINER(quicklauncher->plugin));
if (quicklauncher->launchers)
{
@@ -306,11 +310,12 @@
t_quicklauncher *
quicklauncher_new (XfcePanelPlugin *plugin)
{
+ t_quicklauncher *quicklauncher;
+ gchar *filename;
+
DBG ("create quicklauncher");
- t_quicklauncher *quicklauncher;
-
quicklauncher = g_new0(t_quicklauncher, 1);
- gchar *filename = xfce_panel_plugin_save_location(plugin, TRUE);
+ filename = xfce_panel_plugin_save_location(plugin, TRUE);
quicklauncher->icon_size = (gint) (0.75 * xfce_panel_plugin_get_size(plugin)/2);
DBG ("icon size: %d", quicklauncher->icon_size);
if((!filename) || (!quicklauncher_load_config(quicklauncher, filename) ) )
@@ -344,11 +349,13 @@
{
XfceRc* rcfile;
+ gint i;
+
if( (rcfile = xfce_rc_simple_open(filename, TRUE) ))
{
xfce_rc_set_group(rcfile, NULL);
quicklauncher->nb_lines = xfce_rc_read_int_entry(rcfile, "nb_lines", 1);
- gint i = xfce_rc_read_int_entry(rcfile, "nb_launcher", 0);
+ i = xfce_rc_read_int_entry(rcfile, "nb_launcher", 0);
g_assert(i >= 0);
while(i)
{
@@ -365,15 +372,18 @@
void
quicklauncher_save_config(t_quicklauncher *quicklauncher, const gchar* filename)
{
- guint16 i = quicklauncher->nb_launcher; //hope it always works
- XfceRc* rcfile = xfce_rc_simple_open(filename, FALSE);
+ XfceRc* rcfile;
+ GList* liste;
+ guint16 i;
+ //guint16 i = quicklauncher->nb_launcher; //hope it always works ==> seems that it does not ;)
+ i = quicklauncher->nb_launcher;
+ rcfile = xfce_rc_simple_open(filename, FALSE);
if(!rcfile) return;
xfce_rc_set_group(rcfile, NULL);
xfce_rc_write_int_entry(rcfile, "nb_lines", quicklauncher->nb_lines);
xfce_rc_write_int_entry(rcfile, "nb_launcher", quicklauncher->nb_launcher);
xfce_rc_flush(rcfile);
- GList* liste;
for( liste = quicklauncher->launchers; liste; liste = g_list_next(liste), --i)
launcher_save_config((t_launcher*)liste->data, rcfile, i);
@@ -389,8 +399,8 @@
GdkPixbuf *
_create_pixbuf(gint id, const gchar* name, gint size)
{
+ GdkPixbuf *pixbuf;
DBG ("creating pixbuf %d", size);
- GdkPixbuf *pixbuf;
if(id != XFCE_ICON_CATEGORY_EXTERN)
pixbuf = xfce_icon_theme_load_category(DEFAULT_ICON_THEME, id, size);
else
Deleted: xfce4-quicklauncher-plugin/trunk/po/Makefile
More information about the Goodies-commits
mailing list