Desktop Refresher 1.0.0
Desktop Refresher 1.0.0
Hi.
This is a small application sitting in the system tray, which refreshes the desktop immediately when clicking it. It is made for the use of the ROX desktop and to refresh the PWidgets as well as the WBar.
It is this my first application ever published written in C (thanks to some help by 01micko).
The attached .gz is a fake .gz file. Just remove the fake .gz and make it executable, if necessary.
After this put it into /usr/bin and put a symbolic link to it into $HOME/Startup - and click it.
That's just all.
RSH
This is a small application sitting in the system tray, which refreshes the desktop immediately when clicking it. It is made for the use of the ROX desktop and to refresh the PWidgets as well as the WBar.
It is this my first application ever published written in C (thanks to some help by 01micko).
The attached .gz is a fake .gz file. Just remove the fake .gz and make it executable, if necessary.
After this put it into /usr/bin and put a symbolic link to it into $HOME/Startup - and click it.
That's just all.
RSH
- Attachments
-
- refresh_my_desktop.gz
- (7.68 KiB) Downloaded 556 times
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]
Here are the .pot file and the Icon used.
Both are fake .gz files.
Put the Icon into /usr/share/pixmaps.
Both are fake .gz files.
Put the Icon into /usr/share/pixmaps.
- Attachments
-
- refresh_my_desktop.pot.gz
- (732 Bytes) Downloaded 460 times
-
- restore.png
- (3.01 KiB) Downloaded 926 times
-
- restore.png.gz
- (3.01 KiB) Downloaded 598 times
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]
- charlie6
- Posts: 1230
- Joined: Mon 30 Jun 2008, 04:03
- Location: Saint-Gérard / Walloon part of Belgium
Hi RSH,
here is the french translation
!
also with fake gz extension
but...
what does Desktop refresh means ... ("wirklich") effectively ?
Mit freundlichen Grüßen
Cjarlie
here is the french translation

also with fake gz extension
but...
what does Desktop refresh means ... ("wirklich") effectively ?
Mit freundlichen Grüßen

Cjarlie
- Attachments
-
- refresh_my_desktop-fr.pot.gz
- (753 Bytes) Downloaded 433 times
¡Muy Bueno!
Here is the Spanish translation. (It's an actual zip)

Here is the Spanish translation. (It's an actual zip)
- Attachments
-
- refresh_my_desktop_spanish.zip
- (627 Bytes) Downloaded 439 times
[url=http://murga-linux.com/puppy/viewtopic.php?t=76948]Puppy Linux en español[/url]
Hi.
Thanks for all the translations. Will try to create a NLS package later.
To refresh the widgets easily was my main purpose and since I'm using also the WBar in almost all of my LazY Puppy Systems, I included to refresh the WBar as well.
So Desktop Refresh means (in German): Arbeitsfläche auffrischen.
Is this a bad DE to EN translation?
Should I rename it?
RSH
Thanks for all the translations. Will try to create a NLS package later.
I came to this since I'm using the PWidgets in almost all of my LazY Puppy Systems. Sometimes after booting into X desktop, some of the widgets aren't properly shown on the desktop. It's quite in-comfortable to restart X then or to call the PWidgets GUI to restart the PWidgets so that all widgets are shown on the desktop.what does Desktop refresh means ... ("wirklich") effectively ?
To refresh the widgets easily was my main purpose and since I'm using also the WBar in almost all of my LazY Puppy Systems, I included to refresh the WBar as well.
So Desktop Refresh means (in German): Arbeitsfläche auffrischen.
Is this a bad DE to EN translation?
Should I rename it?
RSH
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]
Hi, zigbert.
Currently this is just a dirty hack and the default puppy icons on the desktop (like write, text, connect etc.) are getting lost. That's why I didn't include this option into the binary.
I need to examine the code of VarioMenu and build a function to save these icons. VarioMenu already has all the functions to add and/or remove parts to/from PuppyPin. Just need to modify some of them for this special purpose.
Though, the drive icons aren't present when refreshing the desktop starts and one can see them re-draw and re-aline at the desktop refresh.
I will come up with this, when completely solved and successfully tested in all my LazY Puppy Systems.
RSH
Yes, partially.zigbert wrote:RSH
In your investigation, have you learned how to refresh pup_event (drive icons on desktop) without restarting X?
I am interested
Thanks
Sigmund
Currently this is just a dirty hack and the default puppy icons on the desktop (like write, text, connect etc.) are getting lost. That's why I didn't include this option into the binary.
I need to examine the code of VarioMenu and build a function to save these icons. VarioMenu already has all the functions to add and/or remove parts to/from PuppyPin. Just need to modify some of them for this special purpose.
Though, the drive icons aren't present when refreshing the desktop starts and one can see them re-draw and re-aline at the desktop refresh.
I will come up with this, when completely solved and successfully tested in all my LazY Puppy Systems.
RSH
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]
I have solved now to keep the default Icons (like write, draw, connect etc.), but the drive icons do randomly disappear from the desktop. So this needs further investigations.zigbert wrote:That's great. I'll be watching

[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]
My icons didn't completely disappear, but the picture shown normally for that desktop entry wasn't there, and they looked like script files.
Is this the same problem?
I fixed it by restoring an older copy of one of the files called globicons which appears to be part of rox.
Are you also publishing the source for your C program?
Is this the same problem?
I fixed it by restoring an older copy of one of the files called globicons which appears to be part of rox.
Are you also publishing the source for your C program?
- LazY Puppy
- Posts: 1934
- Joined: Fri 21 Nov 2014, 18:14
- Location: Germany
Which Puppy are you using?bobc wrote:My icons didn't completely disappear, but the picture shown normally for that desktop entry wasn't there, and they looked like script files.
Is this the same problem?
I fixed it by restoring an older copy of one of the files called globicons which appears to be part of rox.
Are you also publishing the source for your C program?
Here is the Code:
Code: Select all
//#############################################################################
// System Tray Refresh Desktop Function
// 2014-08-14 RSH for LazY Puppy
//#############################################################################
// to compile: gcc -o example example.c `pkg-config --libs --cflags gtk+-2.0`
//#############################################################################
// Include Files
#include <string.h>
#include <libintl.h>
#include <locale.h>
//#include <stdio.h>
//#include <stdlib.h>
//#include <unistd.h>
//#include <sys/types.h>
//#include <sys/stat.h>
//#include <fcntl.h>
#include <gtk/gtk.h>
#include <gdk/gdk.h>
//#include <gdk/gdkkeysyms.h>
//#include <glib/gstdio.h>
//#include <dirent.h>
//#include <errno.h>
#define _(STRING) gettext(STRING)
//#define _(text) gettext(text)
// Icons
GdkPixbuf *a_pixbuf;
GtkStatusIcon *tray_icon;
// Error Check on File Open
GError *gerror = NULL;
//#############################################################################
// Click Functions called from Menu
//#############################################################################
// Run /usr/local/bin/refresh_desktop
void view_popup_menu_run_refreshdesktop (GtkWidget *menuitem, gpointer user_data)
{
// system("/usr/local/bin/refresh_desktop &"); // Now disabled
// Code from /usr/local/bin/refresh_desktop now executed directly here
system("rox -p=$HOME/Choices/ROX-Filer/PuppyPin");
system("sleep .2");
system("bash export UPDATE_SIDEBAR=true");
system("fixwidgets -wallpaper_setter");
system("sleep .2");
system("bash export WBSTARTUP1=$HOME/Startup/wstart");
system("bash export WBSTARTUP2=$HOME/Startup/wbar");
system("killall wbar 2&> /dev/null");
system("sleep .2");
system("[ -e $WBSTARTUP1 ] && exec $HOME/Startup/wstart 2> /dev/null");
system("[ -e $WBSTARTUP2 ] && exec $HOME/Startup/wbar 2> /dev/null");
}
//#############################################################################
// System Tray Icon
//#############################################################################
// Create Tray Icon
static GtkStatusIcon *create_tray_icon()
{
tray_icon = gtk_status_icon_new();
g_signal_connect(G_OBJECT(tray_icon), "activate", G_CALLBACK(view_popup_menu_run_refreshdesktop), NULL);
g_signal_connect(G_OBJECT(tray_icon), "popup-menu", G_CALLBACK(view_popup_menu_run_refreshdesktop), NULL);
a_pixbuf=gdk_pixbuf_new_from_file("/usr/share/pixmaps/restore.png",&gerror);
gtk_status_icon_set_from_pixbuf(tray_icon,a_pixbuf);
gtk_status_icon_set_tooltip(tray_icon, _("Refresh the Desktop"));
gtk_status_icon_set_visible(tray_icon, TRUE);
return tray_icon;
}
//#############################################################################
// Main Program Functions
//#############################################################################
// Main Program
int main(int argc, char **argv)
{
gtk_init(&argc, &argv);
setlocale( LC_ALL, "" );
bindtextdomain( "refresh_my_desktop", "/usr/share/locale" );
textdomain( "refresh_my_desktop" );
tray_icon = create_tray_icon();
//create_tray_icon();
gtk_main();
return 0;
}
//#############################################################################
// End of System Tray Refresh Desktop Function
//#############################################################################
RSH
"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:
No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:
"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:
No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:
I'm running Slacko 5.7.0 but am tweaking it to my own needs and tastes.
I have resolved the problem I had at the time by restoring a copy of globicons I had created as a byproduct of saving a copy of the pins layout after I moved things around to make space for my conky display.
I do have drive icons that don't show up sometimes and will try your program then. I need to investigate the code to hopefully understand it better. I'm not a c programmer, but am trying to adapt to linux.
Thanks for posting the code for me.

I have resolved the problem I had at the time by restoring a copy of globicons I had created as a byproduct of saving a copy of the pins layout after I moved things around to make space for my conky display.
I do have drive icons that don't show up sometimes and will try your program then. I need to investigate the code to hopefully understand it better. I'm not a c programmer, but am trying to adapt to linux.
Thanks for posting the code for me.

- LazY Puppy
- Posts: 1934
- Joined: Fri 21 Nov 2014, 18:14
- Location: Germany
The code below will refresh the drive icons without the need to restart X (collected from 'eventmanager').zigbert wrote:RSH
In your investigation, have you learned how to refresh pup_event (drive icons on desktop) without restarting X?
I am interested
Thanks
Sigmund
Code: Select all
# Update Drive Icons
echo "ICONWIPE" > /var/local/pup_event_icon_change_flag
PID=`grep '/bin/ash.*/sbin/pup_event_frontend_d' <<< $(ps -eo pid,command) | awk '{print $1}'`
kill -9 $PID
echo 'ICONWIPE' > /tmp/pup_event_icon_change_flag
/sbin/clean_desk_icons
rox -p "$HOME/Choices/ROX-Filer/PuppyPin"
kill $(pidof pup_event_frontend_d)
pup_event_frontend_d &
RSH
"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:
No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:
"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:
No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink: