mirror of
https://github.com/transmission/transmission
synced 2024-12-24 08:43:27 +00:00
(gtk) minor tweak
This commit is contained in:
parent
8938adf5fc
commit
dfd31d2495
1 changed files with 7 additions and 7 deletions
|
@ -104,7 +104,7 @@ PrivateData;
|
||||||
PrivateData*
|
PrivateData*
|
||||||
get_private_data( TrWindow * w )
|
get_private_data( TrWindow * w )
|
||||||
{
|
{
|
||||||
return (PrivateData*) g_object_get_data (G_OBJECT(w), PRIVATE_DATA_KEY);
|
return g_object_get_data (G_OBJECT(w), PRIVATE_DATA_KEY);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
|
@ -224,7 +224,7 @@ prefsChanged( TrCore * core UNUSED, const char * key, gpointer wind )
|
||||||
static void
|
static void
|
||||||
privateFree( gpointer vprivate )
|
privateFree( gpointer vprivate )
|
||||||
{
|
{
|
||||||
PrivateData * p = ( PrivateData * ) vprivate;
|
PrivateData * p = vprivate;
|
||||||
g_signal_handler_disconnect( p->core, p->pref_handler_id );
|
g_signal_handler_disconnect( p->core, p->pref_handler_id );
|
||||||
g_free( p->filter_text );
|
g_free( p->filter_text );
|
||||||
g_free( p );
|
g_free( p );
|
||||||
|
@ -233,7 +233,7 @@ privateFree( gpointer vprivate )
|
||||||
static void
|
static void
|
||||||
onYinYangReleased( GtkWidget * w UNUSED, GdkEventButton * button UNUSED, gpointer vprivate )
|
onYinYangReleased( GtkWidget * w UNUSED, GdkEventButton * button UNUSED, gpointer vprivate )
|
||||||
{
|
{
|
||||||
PrivateData * p = ( PrivateData * ) vprivate;
|
PrivateData * p = vprivate;
|
||||||
gtk_menu_popup( GTK_MENU( p->status_menu ), 0, 0, 0, 0, 0, gtk_get_current_event_time( ) );
|
gtk_menu_popup( GTK_MENU( p->status_menu ), 0, 0, 0, 0, 0, gtk_get_current_event_time( ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -254,7 +254,7 @@ status_menu_toggled_cb( GtkCheckMenuItem * menu_item,
|
||||||
{
|
{
|
||||||
if( gtk_check_menu_item_get_active( menu_item ) )
|
if( gtk_check_menu_item_get_active( menu_item ) )
|
||||||
{
|
{
|
||||||
PrivateData * p = (PrivateData*) vprivate;
|
PrivateData * p = vprivate;
|
||||||
const char * val = g_object_get_data( G_OBJECT( menu_item ), STATS_MODE );
|
const char * val = g_object_get_data( G_OBJECT( menu_item ), STATS_MODE );
|
||||||
tr_core_set_pref( p->core, PREF_KEY_STATUS_BAR_STATS, val );
|
tr_core_set_pref( p->core, PREF_KEY_STATUS_BAR_STATS, val );
|
||||||
}
|
}
|
||||||
|
@ -358,7 +358,7 @@ filter_text_toggled_cb( GtkCheckMenuItem * menu_item,
|
||||||
{
|
{
|
||||||
if( gtk_check_menu_item_get_active( menu_item ) )
|
if( gtk_check_menu_item_get_active( menu_item ) )
|
||||||
{
|
{
|
||||||
PrivateData * p = (PrivateData*) vprivate;
|
PrivateData * p = vprivate;
|
||||||
p->filter_text_mode = GPOINTER_TO_UINT( g_object_get_data( G_OBJECT( menu_item ),
|
p->filter_text_mode = GPOINTER_TO_UINT( g_object_get_data( G_OBJECT( menu_item ),
|
||||||
FILTER_TEXT_MODE_KEY ) );
|
FILTER_TEXT_MODE_KEY ) );
|
||||||
refilter( p );
|
refilter( p );
|
||||||
|
@ -368,7 +368,7 @@ filter_text_toggled_cb( GtkCheckMenuItem * menu_item,
|
||||||
static void
|
static void
|
||||||
filter_toggled_cb( GtkToggleButton * toggle, gpointer vprivate )
|
filter_toggled_cb( GtkToggleButton * toggle, gpointer vprivate )
|
||||||
{
|
{
|
||||||
PrivateData * p = (PrivateData*) vprivate;
|
PrivateData * p = vprivate;
|
||||||
GSList * l;
|
GSList * l;
|
||||||
GSList * toggles = g_object_get_data( G_OBJECT( toggle ), FILTER_TOGGLES_KEY );
|
GSList * toggles = g_object_get_data( G_OBJECT( toggle ), FILTER_TOGGLES_KEY );
|
||||||
const gboolean isActive = gtk_toggle_button_get_active( toggle );
|
const gboolean isActive = gtk_toggle_button_get_active( toggle );
|
||||||
|
@ -396,7 +396,7 @@ static void
|
||||||
filter_entry_changed( GtkEditable * e, gpointer vprivate )
|
filter_entry_changed( GtkEditable * e, gpointer vprivate )
|
||||||
{
|
{
|
||||||
char * pch;
|
char * pch;
|
||||||
PrivateData * p = (PrivateData*) vprivate;
|
PrivateData * p = vprivate;
|
||||||
|
|
||||||
pch = gtk_editable_get_chars( e, 0, -1 );
|
pch = gtk_editable_get_chars( e, 0, -1 );
|
||||||
g_free( p->filter_text );
|
g_free( p->filter_text );
|
||||||
|
|
Loading…
Reference in a new issue