Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 15 Dec 2017, 10:28
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
pGtk-theme-refresh-1.1 in C Code
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [3 Posts]  
Author Message
trio


Joined: 21 Dec 2008
Posts: 2083
Location: अनुमोदना

PostPosted: Sun 23 Nov 2014, 01:05    Post subject:  pGtk-theme-refresh-1.1 in C Code
Subject description: a commandline gtk theme setter (no gui)
 

Hi,

This is a commandline gtk theme setter. I hacked a C code without any C Coding knowledge. And compiled in Quirky Smile

I attached binary and source, also a .pet

Version 1.1: add warning if gtkrc supplied doesn't exist, add version

Code:
Usage:
pGtkthemerefresh /path/to/your/gtkrc_theme/gtkrc
example:
pGtkthemerefresh /usr/share/themes/Default/gtk-2.0/gtkrc

WARNING! Be sure the file is a valid gtkrc
Passing no command line arguments will print this message


one glitch, it won't refresh browser's theme (in my case mozilla) on the fly

Regards,

Trio

PS: There's a perl version of it, but can't run in puppy. needs more lib for perl (Gtk2.pm)

Code:
#!/usr/bin/perl
# License: Same as GTK2
use strict;
use warnings;
use Gtk2 '-init';

my $event = Gtk2::Gdk::Event->new("GDK_CLIENT_EVENT");
$event->send_event(1);
$event->window(undef);
$event->message_type(Gtk2::Gdk::Atom->intern("_GTK_READ_RCFILES", 0));
$event->data_format(8);
Gtk2::Gdk::Event->send_clientmessage_toall($event);   


a python version, requires pygtk:
Code:

#!/usr/bin/python

import pygtk

import gtk

events=gtk.gdk.Event(gtk.gdk.CLIENT_EVENT)

data=gtk.gdk.atom_intern("_GTK_READ_RCFILES", True)

events.data_format=8

events.send_event=True

events.message_type=data

events.send_clientmessage_toall()
pGtk-theme-refresh-1.1.pet
Description  /usr/bin/pGtkthemerefresh
pet

 Download 
Filename  pGtk-theme-refresh-1.1.pet 
Filesize  3.62 KB 
Downloaded  428 Time(s) 
pGtkthemerefresh-1.1.tar.gz
Description  my binary and source
gz

 Download 
Filename  pGtkthemerefresh-1.1.tar.gz 
Filesize  4.18 KB 
Downloaded  170 Time(s) 
gtkrc-reload.tar.gz
Description  binary and source
gz

 Download 
Filename  gtkrc-reload.tar.gz 
Filesize  4.02 KB 
Downloaded  184 Time(s) 
gtkrefresh.tar.gz
Description  MU's gtk refresh binary and source
gz

 Download 
Filename  gtkrefresh.tar.gz 
Filesize  3.17 KB 
Downloaded  166 Time(s) 

_________________
My apps

Last edited by trio on Sat 29 Nov 2014, 05:46; edited 6 times in total
Back to top
View user's profile Send private message 
trio


Joined: 21 Dec 2008
Posts: 2083
Location: अनुमोदना

PostPosted: Fri 28 Nov 2014, 05:26    Post subject:  

I hacked a C code without any C Coding knowledge. And compiled in Quirky Smile

I attached binary and source

Code:
Usage:
pGtkthemerefresh /path/to/your/gtkrc_theme/gtkrc
example:
pGtkthemerefresh /usr/share/themes/Default/gtk-2.0/gtkrc

WARNING! Be sure the file is a valid gtkrc
Passing no command line arguments will print this message


see main post

_________________
My apps
Back to top
View user's profile Send private message 
trio


Joined: 21 Dec 2008
Posts: 2083
Location: अनुमोदना

PostPosted: Sat 29 Nov 2014, 03:53    Post subject:  

Version 1.1: add warning if gtkrc supplied doesn't exist, add version

download above, please test

_________________
My apps
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [3 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0389s ][ Queries: 13 (0.0056s) ][ GZIP on ]