diff options
Diffstat (limited to 'misc/gman/files/patch-menu.c')
-rw-r--r-- | misc/gman/files/patch-menu.c | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/misc/gman/files/patch-menu.c b/misc/gman/files/patch-menu.c index cdb3599efb6f..9e0a35c56aec 100644 --- a/misc/gman/files/patch-menu.c +++ b/misc/gman/files/patch-menu.c @@ -4,9 +4,9 @@ /*flag = 0 means not to invoke call backs when changing the states of buttons.*/ void updata_menu_buttons(int flag) { -- int i,j,k,k2; -- k = (int)context->get_value("display_section_policy"); -+ int i,j; +- long i,j,k,k2; +- k = (long)context->get_value("display_section_policy"); ++ long i,j; + intptr_t k,k2; + k = (intptr_t)context->get_value("display_section_policy"); if(k>0 && k<=2) @@ -14,28 +14,28 @@ if(!flag) signal_menu_change++; gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(section_select[k]),1); } -- k = (int)context->get_value("display_section"); +- k = (long)context->get_value("display_section"); + k = (intptr_t)context->get_value("display_section"); for (i = 0;i<10;i++) if(!(k&(1<<i)) != !(((GtkCheckMenuItem*)(section_buttons[i]))->active)) { if(!flag) signal_menu_change++; gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(section_buttons[i]),k&(1<<i)); } -- k = (int)context->get_value("searching_mode"); +- k = (long)context->get_value("searching_mode"); + k = (intptr_t)context->get_value("searching_mode"); if(k>0 && k<=1) if(!(((GtkCheckMenuItem*)(searching_mode_buttons[k]))->active)) { if(!flag) signal_menu_change++; gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(searching_mode_buttons[k]),1); } -- k = (int)context->get_value("show_mode"); +- k = (long)context->get_value("show_mode"); + k = (intptr_t)context->get_value("show_mode"); if(k>0 && k<=3) if(!(((GtkCheckMenuItem*)(show_mode_buttons[k]))->active)) { if(!flag) signal_menu_change++; gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(show_mode_buttons[k]),1); } -- k2 = (int)context->get_value("show_status_bar"); +- k2 = (long)context->get_value("show_status_bar"); + k2 = (intptr_t)context->get_value("show_status_bar"); i = k2&(1<<k); j = (((GtkCheckMenuItem*)(status_bar_button))->active); @@ -44,11 +44,11 @@ static void updata_widget_show(int flag) { -- int k,k2; +- long k,k2; + intptr_t k,k2; -- k = (int)context->get_value("searching_mode"); -- k2 = (int)context->get_value("show_status_bar"); +- k = (long)context->get_value("searching_mode"); +- k2 = (long)context->get_value("show_status_bar"); + k = (intptr_t)context->get_value("searching_mode"); + k2 = (intptr_t)context->get_value("show_status_bar"); @@ -58,8 +58,8 @@ gtk_window_set_title(GTK_WINDOW(window), "Gman"); gtk_window_set_policy( GTK_WINDOW( window ), FALSE, TRUE, FALSE ); gtk_window_set_default_size(GTK_WINDOW(window), -- (int)context->get_value("h_size"), -- (int)context->get_value("v_size")); +- (long)context->get_value("h_size"), +- (long)context->get_value("v_size")); + (intptr_t)context->get_value("h_size"), + (intptr_t)context->get_value("v_size")); @@ -69,8 +69,8 @@ static int section_policy_callback(GtkWidget *w, gpointer data) { // static int signal; -- int k,k2; -- k2 = (int) data; +- long k,k2; +- k2 = (long) data; + intptr_t k,k2; + k2 = (intptr_t) data; if(!((GtkCheckMenuItem*)(section_select[k2]))->active) return 1; @@ -78,7 +78,7 @@ if(signal_menu_change>0) {signal_menu_change--;return 1;} //if(!signal) {signal++;return 1;} //signal--; -- k = (int) context->get_value("display_section_policy"); +- k = (long) context->get_value("display_section_policy"); + k = (intptr_t) context->get_value("display_section_policy"); if(k == k2) return 1; pthread_mutex_lock(&context_lock); @@ -87,13 +87,13 @@ } static int section_select_callback(GtkWidget *w, gpointer data) { -- int var; +- long var; + intptr_t var; if(signal_menu_change>0) {signal_menu_change--;return 1;} pthread_mutex_lock(&context_lock); -- var = (int)context->get_value("display_section"); -- var ^= (int)data; +- var = (long)context->get_value("display_section"); +- var ^= (long)data; + var = (intptr_t)context->get_value("display_section"); + var ^= (intptr_t)data; context->set_value("display_section","int",(void*)var); @@ -103,7 +103,7 @@ } // context->save(stdout,"automatically made by Gman"); -- gtk_exit((int)data); +- gtk_exit((long)data); + gtk_exit((intptr_t)data); } @@ -112,11 +112,11 @@ static int status_bar_callback (GtkWidget *widget, gpointer data) { -- int k,k2; +- long k,k2; + intptr_t k,k2; if(signal_menu_change>0) {signal_menu_change--;return 1;} -- k2 = (int) context->get_value("show_status_bar"); -- k = (int) context->get_value("searching_mode"); +- k2 = (long) context->get_value("show_status_bar"); +- k = (long) context->get_value("searching_mode"); + k2 = (intptr_t) context->get_value("show_status_bar"); + k = (intptr_t) context->get_value("searching_mode"); if(((GtkCheckMenuItem*)(status_bar_button))->active) k2 = k2 | (1<<k); @@ -126,15 +126,15 @@ static int search_mode_callback (GtkWidget *widget, gpointer data) { -- int k,k2; -- k2 = (int) data; +- long k,k2; +- k2 = (long) data; + intptr_t k,k2; + k2 = (intptr_t) data; if(!((GtkCheckMenuItem*)(searching_mode_buttons[k2]))->active) return 1; if(signal_menu_change>0) {signal_menu_change--;return 1;} //if(!signal) {signal++;return 1;} //signal--; -- k = (int) context->get_value("searching_mode"); +- k = (long) context->get_value("searching_mode"); + k = (intptr_t) context->get_value("searching_mode"); if(k == k2) return 1; pthread_mutex_lock(&context_lock); @@ -143,15 +143,15 @@ static int show_mode_callback (GtkWidget *widget, gpointer data) { -- int k,k2; -- k2 = (int) data; +- long k,k2; +- k2 = (long) data; + intptr_t k,k2; + k2 = (intptr_t) data; if(!((GtkCheckMenuItem*)(show_mode_buttons[k2]))->active) return 1; if(signal_menu_change>0) {signal_menu_change--;return 1;} //if(!signal) {signal++;return 1;} //signal--; -- k = (int) context->get_value("show_mode"); +- k = (long) context->get_value("show_mode"); + k = (intptr_t) context->get_value("show_mode"); if(k == k2) return 1; pthread_mutex_lock(&context_lock); @@ -160,7 +160,7 @@ static int button_clicked_callback(GtkWidget * w,gpointer data) { -- int i = (int) data; +- long i = (long) data; + intptr_t i = (intptr_t) data; switch (i) { case 1: task_set_stop(task_key_word_search);break; |