Lines Matching defs:act
56 static gint find_text_index(EgeSelectOneAction *act, gchar const* text);
57 static void commit_pending_change(EgeSelectOneAction *act);
58 static void resync_active( EgeSelectOneAction* act, gint active, gboolean override );
59 static void resync_sensitive( EgeSelectOneAction* act );
568 EgeSelectOneAction* act = EGE_SELECT_ONE_ACTION( action );
579 gboolean valid = gtk_tree_model_get_iter_first( act->private_data->model, &iter );
582 gtk_tree_model_get( act->private_data->model, &iter,
583 act->private_data->labelColumn, &str,
589 g_object_set_qdata( G_OBJECT(item), gDataName, act );
591 gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(item), index == act->private_data->active );
599 valid = gtk_tree_model_iter_next( act->private_data->model, &iter );
631 EgeSelectOneAction* act = EGE_SELECT_ONE_ACTION(action);
634 if ( act->private_data->appearanceMode == APPEARANCE_FULL ) {
662 valid = gtk_tree_model_get_iter_first( act->private_data->model, &iter );
671 gtk_tree_model_get( act->private_data->model, &iter,
672 act->private_data->labelColumn, &str,
674 if ( act->private_data->iconColumn >= 0 ) {
675 gtk_tree_model_get( act->private_data->model, &iter,
676 act->private_data->iconColumn, &iconId,
679 if ( act->private_data->tooltipColumn >= 0 ) {
680 gtk_tree_model_get( act->private_data->model, &iter,
681 act->private_data->tooltipColumn, &tip,
684 if ( act->private_data->sensitiveColumn >= 0 ) {
685 gtk_tree_model_get( act->private_data->model, &iter,
686 act->private_data->sensitiveColumn, &sens,
690 if ( act->private_data->radioActionType ) {
691 void* obj = g_object_new( act->private_data->radioActionType,
702 g_object_set( G_OBJECT(obj), act->private_data->iconProperty, iconId, NULL );
705 if ( act->private_data->iconProperty ) {
707 if ( act->private_data->iconSize >= 0 ) {
708 g_object_set( G_OBJECT(obj), "iconSize", act->private_data->iconSize, NULL );
717 if ( act->private_data->sensitiveColumn >= 0 ) {
724 if ( index == act->private_data->active ) {
727 g_signal_connect( G_OBJECT(ract), "changed", G_CALLBACK( proxy_action_chagned_cb ), act );
740 valid = gtk_tree_model_iter_next( act->private_data->model, &iter );
757 if (act->private_data->selectionMode == SELECTION_OPEN) {
758 normal = gtk_combo_box_new_with_model_and_entry (act->private_data->model);
759 gtk_combo_box_set_entry_text_column (GTK_COMBO_BOX (normal), act->private_data->labelColumn);
763 int maxUsed = scan_max_width( act->private_data->model, act->private_data->labelColumn );
769 gtk_entry_completion_set_model( complete, act->private_data->model );
770 gtk_entry_completion_set_text_column( complete, act->private_data->labelColumn );
777 g_signal_connect( G_OBJECT(child), "activate", G_CALLBACK(combo_entry_changed_cb), act );
778 g_signal_connect( G_OBJECT(child), "focus-out-event", G_CALLBACK(combo_entry_focus_lost_cb), act );
783 normal = gtk_combo_box_new_with_model( act->private_data->model );
784 if ( act->private_data->iconColumn >= 0 ) {
789 gtk_cell_layout_add_attribute( GTK_CELL_LAYOUT(normal), renderer, "stock-id", act->private_data->iconColumn );
794 gtk_cell_layout_add_attribute( GTK_CELL_LAYOUT(normal), renderer, "text", act->private_data->labelColumn );
797 gtk_combo_box_set_active( GTK_COMBO_BOX(normal), act->private_data->active );
798 if ( entry && (act->private_data->active == -1) ) {
799 gtk_entry_set_text( entry, act->private_data->activeText );
805 g_object_set_data( G_OBJECT(act), "ege-combo-box", normal );
807 if (act->private_data->appearanceMode == APPEARANCE_COMPACT) {
852 void resync_active( EgeSelectOneAction* act, gint active, gboolean override )
854 if ( override || (act->private_data->active != active) ) {
855 act->private_data->active = active;
856 GSList* proxies = gtk_action_get_proxies( GTK_ACTION(act) );
874 gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(combo))), act->private_data->activeText);
914 g_signal_emit( G_OBJECT(act), signals[CHANGED], 0);
918 void resync_sensitive( EgeSelectOneAction* act )
920 GSList* proxies = gtk_action_get_proxies( GTK_ACTION(act) );
949 valid = gtk_tree_model_get_iter_first( act->private_data->model, &iter );
955 gtk_tree_model_get( act->private_data->model, &iter,
956 act->private_data->labelColumn, &str,
960 gtk_tree_model_get( act->private_data->model, &iter,
961 act->private_data->sensitiveColumn, &sens,
967 valid = gtk_tree_model_iter_next( act->private_data->model, &iter );
983 g_signal_emit( G_OBJECT(act), signals[CHANGED], 0);
988 EgeSelectOneAction *act = EGE_SELECT_ONE_ACTION(user_data);
1016 if (act->private_data->pendingText && text && (strcmp(act->private_data->pendingText, text) == 0) ) {
1019 if (act->private_data->pendingText) {
1020 g_free(act->private_data->pendingText);
1022 act->private_data->pendingText = text;
1025 } else if (newActive != act->private_data->active) {
1026 if (act->private_data->pendingText) {
1027 g_free(act->private_data->pendingText);
1028 act->private_data->pendingText = 0;
1030 g_object_set( G_OBJECT(act), "active", newActive, NULL );
1041 EgeSelectOneAction* act = EGE_SELECT_ONE_ACTION(data);
1045 commit_pending_change(act);
1052 EgeSelectOneAction* act = EGE_SELECT_ONE_ACTION(user_data);
1054 commit_pending_change(act);
1057 void commit_pending_change(EgeSelectOneAction *act)
1059 if (act->private_data->pendingText) {
1060 if (act->private_data->activeText && (strcmp(act->private_data->pendingText, act->private_data->activeText) == 0)) {
1062 g_free(act->private_data->pendingText);
1063 act->private_data->pendingText = 0;
1065 gint matching = find_text_index(act, act->private_data->pendingText);
1067 if (act->private_data->activeText) {
1068 g_free(act->private_data->activeText);
1070 act->private_data->activeText = act->private_data->pendingText;
1071 act->private_data->pendingText = 0;
1074 g_free(act->private_data->activeText);
1075 act->private_data->activeText = 0;
1076 g_object_set( G_OBJECT(act), "active", matching, NULL );
1077 } else if (act->private_data->active != -1) {
1078 g_object_set( G_OBJECT(act), "active", -1, NULL );
1080 resync_active( act, -1, TRUE );
1086 gint find_text_index(EgeSelectOneAction *act, gchar const* text)
1092 gboolean valid = gtk_tree_model_get_iter_first( act->private_data->model, &iter );
1096 gtk_tree_model_get( act->private_data->model, &iter,
1097 act->private_data->labelColumn, &str,
1108 valid = gtk_tree_model_iter_next( act->private_data->model, &iter );
1118 EgeSelectOneAction* act = (EgeSelectOneAction*)g_object_get_qdata( G_OBJECT(obj), gDataName );
1120 if ( gtk_check_menu_item_get_active(item) && (newActive != act->private_data->active) ) {
1121 g_object_set( G_OBJECT(act), "active", newActive, NULL );
1129 EgeSelectOneAction* act = EGE_SELECT_ONE_ACTION(user_data);
1131 if ( newActive != act->private_data->active ) {
1132 g_object_set( G_OBJECT(act), "active", newActive, NULL );