Commit 38d095a5 authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

add set_active for the menu_item

parent 33c848bd
...@@ -169,7 +169,8 @@ static void ...@@ -169,7 +169,8 @@ static void
call_minimize ( void * foo) call_minimize ( void * foo)
{ {
gtk_widget_hide(GTK_WIDGET( get_main_window() )); gtk_widget_hide(GTK_WIDGET( get_main_window() ));
set_minimized( !MAIN_WINDOW_SHOW );
set_minimized( TRUE );
} }
static void static void
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
GtkStatusIcon* status; GtkStatusIcon* status;
GtkWidget * show_menu_item; GtkWidget * show_menu_item;
gboolean __minimized = MAIN_WINDOW_SHOW; gboolean __minimized = MINIMIZED;
void void
status_quit ( void * foo) status_quit ( void * foo)
...@@ -51,12 +51,12 @@ show_hide (void) ...@@ -51,12 +51,12 @@ show_hide (void)
if(gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(show_menu_item))) if(gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(show_menu_item)))
{ {
gtk_widget_show(GTK_WIDGET(get_main_window())); gtk_widget_show(GTK_WIDGET(get_main_window()));
set_minimized( MAIN_WINDOW_SHOW ); set_minimized( !MINIMIZED );
} }
else else
{ {
gtk_widget_hide(GTK_WIDGET(get_main_window())); gtk_widget_hide(GTK_WIDGET(get_main_window()));
set_minimized( !MAIN_WINDOW_SHOW ); set_minimized( MINIMIZED );
} }
} }
...@@ -140,4 +140,5 @@ void ...@@ -140,4 +140,5 @@ void
set_minimized( gboolean state) set_minimized( gboolean state)
{ {
__minimized = state ; __minimized = state ;
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(show_menu_item), !state);
} }
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#ifndef __STATUSICON_H__ #ifndef __STATUSICON_H__
#define __STATUSICON_H__ #define __STATUSICON_H__
#define MAIN_WINDOW_SHOW TRUE #define MINIMIZED TRUE
#include <gtk/gtk.h> #include <gtk/gtk.h>
/** @file statusicon.h /** @file statusicon.h
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment