Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[GTK] force running apps to reload gtkrc?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
avx
Advocate
Advocate


Joined: 21 Jun 2004
Posts: 2152

PostPosted: Tue Jan 24, 2012 7:45 pm    Post subject: [GTK] force running apps to reload gtkrc? Reply with quote

I'd like to know, if there's a way to tell all running GTK apps to reload the gtkrc on the fly.

In my case, I'd like to implement an event based switch of themes(night/day -> dark/light), but f.e. claws-mail doesn't do it without restarting the application. In the case of claws, once I switched the theme, ie. with gtk-chtheme, the message-preview gets updated, but the folder- and maillistings only update on restart.

I found this little app, which from the description claims to do it, but it just exits with non-zero status.
http://aur.archlinux.org/packages.php?ID=44052
_________________
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
Back to top
View user's profile Send private message
avx
Advocate
Advocate


Joined: 21 Jun 2004
Posts: 2152

PostPosted: Mon Jan 30, 2012 3:34 pm    Post subject: Reply with quote

*bump* :?
_________________
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
Back to top
View user's profile Send private message
CrazyTerabyte
Apprentice
Apprentice


Joined: 30 Dec 2004
Posts: 193

PostPosted: Sat Jan 25, 2014 12:26 pm    Post subject: Reply with quote

I know this thread is old, but this information is relevant anyway.

From your link to AUR, I found that someone posted a link to a perl version of the gtkrc-2 reloader.

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);


Just tested this perl version and it works fine!

(I still don't know about GTK-3)[/code]
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
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