Esempio n. 1
0
static gboolean finish_test(gpointer data)
{
	GtkTreeSelection *selection;

	selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(test_item_view));
	gtk_tree_selection_unselect_all(selection);

	gtk_widget_set_sensitive(start_test_button, TRUE);
	gtk_widget_set_sensitive(stop_test_button, FALSE);

	switch(*(gint *)data) {
	case TEST_SUCCESS:
		set_color(result_label, COLOR_GREEN);
		gtk_label_set_text(GTK_LABEL(result_label), "PASS");
		break;

	case TEST_FAILURE:
		set_color(result_label, COLOR_RED);
		gtk_label_set_text(GTK_LABEL(result_label), "FAILURE");
		break;

	case TEST_MANUAL_QUIT:
		gtk_label_set_text(GTK_LABEL(result_label), "");
		break;

	default: ;
	}

	return FALSE;
}
Esempio n. 2
0
File: lists.c Progetto: proton/xmpc
static gboolean
cb_button_pressed (XfmpcLists *lists,
									GdkEventButton *event)
{
	XfmpcListsPrivate    *priv = XFMPC_LISTS (lists)->priv;
	GtkTreeSelection         *selection;
	GtkTreePath              *path;

	if (event->type != GDK_BUTTON_PRESS || event->button != 3)
		return FALSE;

	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->treeview));
	if (gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (priv->treeview),
																		event->x, event->y,
																		&path, NULL, NULL, NULL))
		{
			if (!gtk_tree_selection_path_is_selected (selection, path))
				{
					gtk_tree_selection_unselect_all (selection);
					gtk_tree_selection_select_path (selection, path);
				}
			gtk_tree_path_free (path);
		}

	popup_menu (lists);

	return TRUE;
}
Esempio n. 3
0
static gboolean button_pressed(GtkWidget *widget,
				GdkEventButton *event, gpointer user_data)
{
	GtkTreeSelection *selection;
	GtkTreePath *path;

	if (event->type != GDK_BUTTON_PRESS)
		return FALSE;

	if (event->button != 3)
		return FALSE;

	selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(widget));

	if (gtk_tree_selection_count_selected_rows(selection) != 1)
		return FALSE;

	if (gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(widget),
					(gint) event->x, (gint) event->y,
					&path, NULL, NULL, NULL) == FALSE)
		return FALSE;

	gtk_tree_selection_unselect_all(selection);
	gtk_tree_selection_select_path(selection, path);

	gtk_tree_path_free(path);

	show_popup(widget, event, selection);

	return TRUE;
}
Esempio n. 4
0
void Tag_Area_Picture_Drag_Data (GtkWidget *widget, GdkDragContext *dc,
                                 gint x, gint y, GtkSelectionData *selection_data,
                                 guint info, guint t, gpointer data)
{
    GtkTreeSelection *selection;
    gchar **uri_list, **uri;

    gtk_drag_finish(dc, TRUE, FALSE, t);

    if (info != TARGET_URI_LIST
    ||  !selection_data
    ||  !PictureEntryView)
        return;

    selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(PictureEntryView));
    gtk_tree_selection_unselect_all(selection);

    uri = uri_list = g_strsplit((gchar *)gtk_selection_data_get_data(selection_data), "\r\n", 0);
    while (*uri && strlen(*uri))
    {
        GFile *file = g_file_new_for_uri (*uri);

        et_picture_load_file (file, NULL);

        g_object_unref (file);
        uri++;
    }
    g_strfreev(uri_list);
}
void
seahorse_key_manager_store_set_selected_objects (GtkTreeView *view, GList* objects)
{
	SeahorseKeyManagerStore* skstore;
	GtkTreeSelection* selection;
	gboolean first = TRUE;
	GtkTreePath *path;
	GList *l;
	GtkTreeIter iter;

	g_return_if_fail (GTK_IS_TREE_VIEW (view));
	selection = gtk_tree_view_get_selection (view);
	gtk_tree_selection_unselect_all (selection);

	skstore = SEAHORSE_KEY_MANAGER_STORE (gtk_tree_view_get_model (view));
	g_return_if_fail (SEAHORSE_IS_KEY_MANAGER_STORE (skstore));

	for (l = objects; l; l = g_list_next (l)) {
		if (gcr_collection_model_iter_for_object (GCR_COLLECTION_MODEL (skstore),
		                                          l->data, &iter)) {
			gtk_tree_selection_select_iter (selection, &iter);

			/* Scroll the first row selected into view */
			if (first) {
				path = gtk_tree_model_get_path (gtk_tree_view_get_model (view), &iter);
				gtk_tree_view_scroll_to_cell (view, path, NULL, FALSE, 0.0, 0.0);
				gtk_tree_path_free (path);
				first = FALSE;
			}
		}
	}
}
Esempio n. 6
0
void
mdm_lang_set (char *language)
{
   char *locale;
   GtkTreeSelection *selection;
   GtkTreeIter iter = {0};

   g_free (current_language);
   current_language = g_strdup (language);

   if (dialog == NULL)
     mdm_lang_setup_treeview ();

   if (language == NULL)
      return;
 
   lang_set_custom_callback (language);

   selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tv));
   gtk_tree_selection_unselect_all (selection);

   if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (lang_model), &iter)) {
      do {
         gtk_tree_model_get (GTK_TREE_MODEL (lang_model), &iter, LOCALE_COLUMN, &locale, -1);
         if (locale != NULL && strcmp (locale, language) == 0) {
            GtkTreePath *path = gtk_tree_model_get_path (GTK_TREE_MODEL (lang_model), &iter);

            gtk_tree_selection_select_iter (selection, &iter);
            gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (tv), path, NULL, FALSE, 0.0, 0.0);
            gtk_tree_path_free (path);
            break;
         }
      } while (gtk_tree_model_iter_next (GTK_TREE_MODEL (lang_model), &iter));
   }
}
Esempio n. 7
0
/* cleans up the item list, sets up the iter hash when called for the first time */
void
item_list_view_clear (ItemListView *ilv)
{
	GtkAdjustment		*adj;
	GtkTreeStore		*itemstore;

	itemstore = GTK_TREE_STORE (gtk_tree_view_get_model (ilv->priv->treeview));
	
	/* unselecting all items is important to remove items
	   whose removal is deferred until unselecting */
	gtk_tree_selection_unselect_all (gtk_tree_view_get_selection (ilv->priv->treeview));
	
	adj = gtk_tree_view_get_vadjustment (ilv->priv->treeview);
	gtk_adjustment_set_value (adj, 0.0);
#if GTK_API_VERSION >= 3
	gtk_scrollable_set_vadjustment (GTK_SCROLLABLE (ilv->priv->treeview), adj);
#else
	gtk_tree_view_set_vadjustment (ilv->priv->treeview, adj);
#endif
	if (itemstore)
		gtk_tree_store_clear (itemstore);
	if (ilv->priv->item_id_to_iter)
		g_hash_table_destroy (ilv->priv->item_id_to_iter);
	
	ilv->priv->item_id_to_iter = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, g_free);
	
	/* enable batch mode for following item adds */
	ilv->priv->batch_mode = TRUE;
	ilv->priv->batch_itemstore = item_list_view_create_tree_store ();
}
Esempio n. 8
0
void
feed_list_view_select (nodePtr node)
{
	GtkTreeModel *model = gtk_tree_view_get_model (flv->treeview);

	if (model && node && node != feedlist_get_root ()) {
		GtkTreePath *path;

		/* in filtered mode we need to convert the iterator */
		if (flv->feedlist_reduced_unread) {
			GtkTreeIter iter;
			gtk_tree_model_filter_convert_child_iter_to_iter (GTK_TREE_MODEL_FILTER (flv->filter), &iter, feed_list_view_to_iter (node->id));
			path = gtk_tree_model_get_path (model, &iter);
		} else {
			path = gtk_tree_model_get_path (model, feed_list_view_to_iter (node->id));
		}

		if (node->parent)
			feed_list_view_expand (node->parent);

		if (path) {
			gtk_tree_view_scroll_to_cell (flv->treeview, path, NULL, FALSE, 0.0, 0.0);
			gtk_tree_view_set_cursor (flv->treeview, path, NULL, FALSE);
			gtk_tree_path_free (path);
		}
 	} else {
		GtkTreeSelection *selection = gtk_tree_view_get_selection (flv->treeview);
		gtk_tree_selection_unselect_all (selection);
	}
}
Esempio n. 9
0
gboolean
on_tree_view_button_pressed (GtkWidget *      view,
                             GdkEventButton * event,
                             gpointer         func)
{
  GtkTreeView * tv = GTK_TREE_VIEW (view);

  if (event->type == GDK_BUTTON_PRESS  &&  event->button == 3)
    {
      GtkTreePath * path;
      GtkTreeSelection * selection = gtk_tree_view_get_selection (tv);

      if (gtk_tree_view_get_path_at_pos (tv,
                                         (gint) event->x,
                                         (gint) event->y,
                                         &path, NULL, NULL, NULL))
        {
          if (!gtk_tree_selection_path_is_selected (selection, path))
            {
              gtk_tree_selection_unselect_all (selection);
              gtk_tree_selection_select_path (selection, path);
            }
          gtk_tree_path_free (path);
        }

      if (func != NULL)
        ((PopupFunc*)func)(view, event);

      return TRUE;
    }

  return FALSE;
}
Esempio n. 10
0
/*
 * This routine is called when the user clicks the "OK" button in the
 * "Decode As..." dialog window and the ASN.1 page is foremost.
 * This routine takes care of making any changes requested to the ASN.1
 * decoding.
 *
 * @param notebook_pg A pointer to the "ASN.1" notebook page.
 */
static void
decode_ber(GtkWidget *notebook_pg)
{
    GtkWidget *list;
    gchar              *syntax;
    GtkTreeSelection  *selection;
    GtkTreeModel      *model;
    GtkTreeIter        iter;

    syntax = NULL;
    list = g_object_get_data(G_OBJECT(notebook_pg), E_PAGE_LIST);

    if (requested_action == E_DECODE_NO)
	gtk_tree_selection_unselect_all(gtk_tree_view_get_selection(GTK_TREE_VIEW(list)));

    selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(list));
    if (gtk_tree_selection_get_selected(selection, &model, &iter) == FALSE)
    {
	syntax = NULL;
    } else {
      gtk_tree_model_get(model, &iter, E_LIST_S_PROTO_NAME, &syntax, -1);
    }

    if ((syntax != NULL && strcmp(syntax, "(default)") == 0) ) {
      ber_decode_as(NULL);
    } else {
      ber_decode_as(syntax);
    }
    g_free(syntax);
}
Esempio n. 11
0
void wxListBox::DoSetSelection( int n, bool select )
{
    wxCHECK_RET( m_treeview != NULL, wxT("invalid listbox") );

    wxGtkEventsDisabler<wxListBox> noEvents(this);

    GtkTreeSelection* selection = gtk_tree_view_get_selection(m_treeview);

    // passing -1 to SetSelection() is documented to deselect all items
    if ( n == wxNOT_FOUND )
    {
        gtk_tree_selection_unselect_all(selection);
        return;
    }

    wxCHECK_RET( IsValid(n), wxT("invalid index in wxListBox::SetSelection") );


    GtkTreeIter iter;
    wxCHECK_RET( GTKGetIteratorFor(n, &iter), wxT("Invalid index") );

    if (select)
        gtk_tree_selection_select_iter(selection, &iter);
    else
        gtk_tree_selection_unselect_iter(selection, &iter);

    wxGtkTreePath path(
            gtk_tree_model_get_path(GTK_TREE_MODEL(m_liststore), &iter));

    gtk_tree_view_scroll_to_cell(m_treeview, path, NULL, FALSE, 0.0f, 0.0f);
}
Esempio n. 12
0
static gboolean menu_cardview_button_press_event(GtkWidget *treeview, GdkEventButton *event, gpointer userdata)
{
    GtkTreeSelection *selection;
    GtkTreePath *path;

    if (event->type == GDK_BUTTON_PRESS  &&  event->button == 3)
    {
        selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview));

        if (gtk_tree_selection_count_selected_rows(selection)  <= 1)
        {

            /* Get tree path for row that was clicked */
            if (gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(treeview),
                                              (gint) event->x,
                                              (gint) event->y,
                                              &path, NULL, NULL, NULL))
            {
                gtk_tree_selection_unselect_all(selection);
                gtk_tree_selection_select_path(selection, path);
                gtk_tree_path_free(path);
            }
        }
        menu_cardview_context_menu(treeview,event,userdata);
        return TRUE;
    }
    /*
    else if (event->type == GDK_2BUTTON_PRESS  &&  event->button == 1)
    {
      g_printf("double click\n");
    }
    */
    return FALSE;
}
Esempio n. 13
0
gboolean on_button_pressed(GtkWidget * treeview, GdkEventButton * event, gpointer UNUSED(userdata))
{
  /* single click with the right mouse button? */
  if (event->type == GDK_BUTTON_PRESS && event->button == 3)
  {
    /* select row if no row is selected or only one other row is selected */
    {
      GtkTreeSelection *selection;

      selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview));

      /* Note: gtk_tree_selection_count_selected_rows() does not exist in gtk+-2.0, only in gtk+ >= v2.2 ! */
      if (gtk_tree_selection_count_selected_rows(selection) <= 1)
      {
        GtkTreePath *path;

        /* Get tree path for row that was clicked */
        if (gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(treeview), (gint)event->x, (gint)event->y, &path, NULL, NULL, NULL))
        {
          gtk_tree_selection_unselect_all(selection);
          gtk_tree_selection_select_path(selection, path);
          gtk_tree_path_free(path);
        }
      }
    }

    popup_menu(treeview, event);

    return TRUE; /* we handled this */
  }

  return FALSE; /* we did not handle this */
}
Esempio n. 14
0
gboolean
on_table_button_press_event (GtkWidget *widget, GdkEventButton *event, gpointer data)
{
	GtkTreePath *path;
	GtkTreeView *treeview = GTK_TREE_VIEW (widget);
	GtkWidget *popup;

	if (event->button == 3) {
		if (gtk_tree_view_get_path_at_pos (treeview, event->x, event->y, &path, NULL, NULL, NULL)) {
			gtk_tree_selection_unselect_all (gtk_tree_view_get_selection (treeview));
			gtk_tree_selection_select_path (gtk_tree_view_get_selection (treeview), path);

			popup = g_object_get_data (G_OBJECT (treeview), "popup");
			do_popup_menu (widget, popup, event);
		}

		return TRUE;
	}

	/*
	if (event->type == GDK_2BUTTON_PRESS ||
	    event->type == GDK_3BUTTON_PRESS) {
		show_settings ();

		return TRUE;
	}
	*/

	return FALSE;
}
Esempio n. 15
0
static gboolean table_onButtonPressed(GtkWidget *treeview, GdkEventButton *event, gpointer userdata){
	dataToSend_ *dataToSend;
	/* single click with the right mouse button? */
    if (event->type == GDK_BUTTON_PRESS  &&  event->button == 3){
		g_print ("Single right click on the tree view.\n");
		if (1){
			GtkTreeSelection *selection;
			selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview));
			//! Note: gtk_tree_selection_count_selected_rows() does not exist in gtk+-2.0, only in gtk+ >= v2.2
			if (gtk_tree_selection_count_selected_rows(selection)  <= 1){
				GtkTreePath *path;
				//! Get tree path for row that was clicked
				if (gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(treeview),(gint) event->x, (gint) event->y,&path, NULL, NULL, NULL)){
					gtk_tree_selection_unselect_all(selection);
					gtk_tree_selection_select_path(selection, path);
					gtk_tree_path_free(path);
					
					GtkTreeModel     *model;
					GtkTreeIter       iter;
					if (gtk_tree_selection_get_selected(selection, &model, &iter)){
						dataToSend = struct_new(dataToSend_);
						gtk_tree_model_get (model, &iter, 0, &dataToSend->id, -1);    
						gtk_tree_model_get (model, &iter, 5, &dataToSend->file, -1);    
					}
				}
			}
		}
		table_popup_menu(treeview, event, dataToSend);
		return TRUE; /* we handled this */
	}
	return FALSE; /* we did not handle this */
}
Esempio n. 16
0
static gboolean
cv_tree_click_cb (GtkTreeView *tree, GdkEventButton *event, chanview *cv)
{
	chan *ch;
	GtkTreeSelection *sel;
	GtkTreePath *path;
	GtkTreeIter iter;
	int ret = FALSE;

	if (event->button != 3 && event->state == 0)
		return FALSE;

	sel = gtk_tree_view_get_selection (tree);
	if (gtk_tree_view_get_path_at_pos (tree, event->x, event->y, &path, 0, 0, 0))
	{
		if (event->button == 2)
		{
			gtk_tree_selection_unselect_all (sel);
			gtk_tree_selection_select_path (sel, path);
		}
		if (gtk_tree_model_get_iter (GTK_TREE_MODEL (cv->store), &iter, path))
		{
			gtk_tree_model_get (GTK_TREE_MODEL (cv->store), &iter, COL_CHAN, &ch, -1);
			ret = cv->cb_contextmenu (cv, ch, ch->tag, ch->userdata, event);
		}
		gtk_tree_path_free (path);
	}
	return ret;
}
Esempio n. 17
0
static void
select_index (const gchar *uri)
{
  GtkTreeSelection *selection;
  GtkTreeIter      *iter = NULL;

  selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view));

  if (uri)
    iter = g_hash_table_lookup (uri_hash_table, uri);

  if (iter)
    {
      GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (tree_view));
      GtkTreePath  *path;
      GtkTreePath  *scroll_path;

      path = gtk_tree_model_get_path (model, iter);
      scroll_path = gtk_tree_path_copy (path);

      gtk_tree_path_up (path);
      gtk_tree_view_expand_to_path (GTK_TREE_VIEW (tree_view), path);
      gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (tree_view), scroll_path,
                                    NULL, FALSE, 0.0, 0.0);

      gtk_tree_path_free (path);
      gtk_tree_path_free (scroll_path);

      gtk_tree_selection_select_iter (selection, iter);
    }
  else
    {
      gtk_tree_selection_unselect_all (selection);
    }
}
Esempio n. 18
0
/* typically called when filling the item tree view */
void 
item_list_view_prefocus (ItemListView *ilv)
{
	GtkWidget		*focus_widget;
	GtkTreeSelection	*itemselection;
	
	/* the following is important to prevent setting the unread
	   flag for the first item in the item list when the user does
	   the first click into the treeview, if we don't do a focus and
	   unselect, GTK would always (exception: clicking on first item)
	   generate two selection-change events (one for the clicked and
	   one for the selected item)!!! */

	/* we need to restore the focus after we temporarily select the itemlist */
	focus_widget = gtk_window_get_focus (GTK_WINDOW (liferea_shell_get_window ()));

	/* prevent marking as unread before focussing, which leads to a selection */
	gtk_widget_grab_focus (GTK_WIDGET (ilv->priv->treeview));

	itemselection = gtk_tree_view_get_selection (ilv->priv->treeview);
	if (itemselection)
		gtk_tree_selection_unselect_all (itemselection);
	
	if (focus_widget)
		gtk_widget_grab_focus (focus_widget);
}
Esempio n. 19
0
void
item_list_view_select (ItemListView *ilv, itemPtr item)
{
	GtkTreeView		*treeview = ilv->priv->treeview;
	GtkTreeSelection	*selection;
	
	selection = gtk_tree_view_get_selection (treeview);
	
	if (item) {
		GtkTreeIter		iter;
		GtkTreePath		*path;
		
		if (!item_list_view_id_to_iter(ilv, item->id, &iter))
			/* This is an evil hack to fix SF #1870052: crash
			   upon hitting <enter> when no headline selected.
			   FIXME: This code is rotten! Rewrite it! Now! */
			itemlist_selection_changed (NULL);

		path = gtk_tree_model_get_path (gtk_tree_view_get_model (treeview), &iter);
		gtk_tree_view_set_cursor (treeview, path, NULL, FALSE);
		gtk_tree_view_scroll_to_cell (treeview, path, NULL, FALSE, 0.0, 0.0);
		gtk_tree_path_free (path);
	} else {
		gtk_tree_selection_unselect_all (selection);
	}
}
Esempio n. 20
0
static void
did_not_drag (EphyNodeView *view,
	      GdkEventButton *event)
{
	GtkTreeView *tree_view;
	GtkTreeSelection *selection;
	GtkTreePath *path;

	tree_view = GTK_TREE_VIEW (view);
	selection = gtk_tree_view_get_selection (tree_view);

	if (gtk_tree_view_get_path_at_pos (tree_view, event->x, event->y,
					   &path, NULL, NULL, NULL))
	{
		if((event->button == 1 || event->button == 2) &&
		   gtk_tree_selection_path_is_selected (selection, path) &&
		   !button_event_modifies_selection (event))
		{
			if (gtk_tree_selection_get_mode (selection) == GTK_SELECTION_MULTIPLE)
			{
				gtk_tree_selection_unselect_all (selection);
			}

			gtk_tree_selection_select_path (selection, path);
		}

		gtk_tree_path_free (path);
	}
}
Esempio n. 21
0
void
uim_cand_win_vertical_gtk_set_index(UIMCandWinVerticalGtk *vertical_cwin, gint index)
{
  UIMCandWinGtk *cwin;
  UIMCandWinVerticalGtkClass *vertical_cwin_class;
  UIMCandWinGtkClass *cwin_class;

  g_return_if_fail(UIM_IS_CAND_WIN_VERTICAL_GTK(vertical_cwin));
  cwin = UIM_CAND_WIN_GTK(vertical_cwin);

  /* call parent method */
  vertical_cwin_class = UIM_CAND_WIN_VERTICAL_GTK_GET_CLASS(vertical_cwin);
  cwin_class = g_type_class_peek_parent(vertical_cwin_class);
  cwin_class->set_index(cwin, index);

  if (cwin->candidate_index >= 0) {
    GtkTreePath *path;
    gint pos = index;

    if (cwin->display_limit)
      pos = cwin->candidate_index % cwin->display_limit;

    path = gtk_tree_path_new_from_indices(pos, -1);
    gtk_tree_view_set_cursor(GTK_TREE_VIEW(cwin->view),
			     path, NULL, FALSE);
    gtk_tree_path_free(path);

  } else {
    GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(cwin->view));

    gtk_tree_selection_unselect_all(selection);
    uim_cand_win_gtk_update_label(cwin);
  }
}
Esempio n. 22
0
/*
 * If double clicking the PictureEntryView :
 *  - over a selected row : opens properties window
 *  - over an empty area : open the adding window
 */
gboolean Picture_Entry_View_Button_Pressed (GtkTreeView *treeview, GdkEventButton *event, gpointer data)
{
    if (event->type == GDK_BUTTON_PRESS && event->button == 1)
    {
        if (event->window == gtk_tree_view_get_bin_window (treeview))
        {
            if (!gtk_tree_view_get_path_at_pos (treeview, event->x, event->y,
                                                NULL, NULL, NULL, NULL))
            {
                gtk_tree_selection_unselect_all (gtk_tree_view_get_selection (treeview));
            }
        }
    }

    if (event->type==GDK_2BUTTON_PRESS && event->button==1)
    {
        GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(PictureEntryView));

        if (gtk_tree_selection_count_selected_rows (GTK_TREE_SELECTION (selection)) >= 1)
            Picture_Properties_Button_Clicked (G_OBJECT (image_properties_toolitem));
        else
            Picture_Add_Button_Clicked (G_OBJECT (add_image_toolitem));

        return TRUE;
    }

    return FALSE;
}
Esempio n. 23
0
static gboolean
userlist_dnd_leave (GtkTreeView * widget, GdkDragContext * context,
                    guint ttime)
{
    gtk_tree_selection_unselect_all (gtk_tree_view_get_selection (widget));
    return TRUE;
}
Esempio n. 24
0
void pListView::setSelected(bool selected) {
  if(selected == false) {
    GtkTreeSelection* selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(subWidget));
    gtk_tree_selection_unselect_all(selection);
  } else {
    setSelection(listView.state.selection);
  }
}
Esempio n. 25
0
static gboolean workspaces_tree_focused_out(GtkTreeView* treeview, GdkEventFocus* event, PagerData* pager)
{
	GtkTreeSelection* selection;

	selection = gtk_tree_view_get_selection(treeview);
	gtk_tree_selection_unselect_all(selection);
	return TRUE;
}
Esempio n. 26
0
void
fi_gui_files_unselect_all(void)
{
	GtkTreeView *tv = treeview_download_files;

	g_return_if_fail(tv);
	gtk_tree_selection_unselect_all(gtk_tree_view_get_selection(tv));
}
Esempio n. 27
0
 void Meaning::unselectListsExcept(GtkWidget* list) throw()
 {
     for(int i = 0;i < static_cast<int>(d_lists.size());++i)
     {
         if (d_lists[i] != list)
             gtk_tree_selection_unselect_all(gtk_tree_view_get_selection(GTK_TREE_VIEW(d_lists[i])));
     }
 }
Esempio n. 28
0
static void
on_cert_changed (GcrCertificateRenderer *renderer, gpointer arg)
{
    GtkTreeView *tree_view = GTK_TREE_VIEW(arg);
    GtkTreeSelection *tree_sel = gtk_tree_view_get_selection(tree_view);
    if (tree_sel != cur_sel)
        gtk_tree_selection_unselect_all(tree_sel);
}
Esempio n. 29
0
static gboolean unselect_all_todos (GtkWidget *widget, GdkEventFocus *event, gpointer userdata)
{
	GtkTreeSelection *selection;

	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (widget));
	gtk_tree_selection_unselect_all (selection);
	return FALSE;
}
Esempio n. 30
0
TILP_EXPORT void action_deselect_all_clicked(GtkButton * button, gpointer user_data)
{
	GtkTreeView *view = GTK_TREE_VIEW(clist);
	GtkTreeSelection *sel;
	
	sel = gtk_tree_view_get_selection(view);
	gtk_tree_selection_unselect_all(sel);
}