/* Copyright 2009; D. Liebman, This file is part of gaptsearch. gaptsearch is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. gaptsearch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gaptsearch. If not, see . */ /*------------------enum and struct -----------------------------*/ enum { USE_APTITUDE, USE_APTCACHE, //package search and show options CACHED_FILES, PACKAGE_INFO, INSTALLED_FILES //options for 'text_special' tab }; typedef struct _Data Data; struct _Data { GtkWidget *gladewindow; GtkEntry *entry; GtkTreeView *tree; GtkTextView *text_all; GtkTextView *text_description; GtkTextView *text_special; GtkLabel *text_all_label; GtkLabel *text_description_label; GtkLabel *text_special_label; GtkStatusbar *statusbar; guint context_id; guint status_id; GtkStatusbar *statusversion; guint version_context_id; guint version_status_id; gint search_command; gint show_command; gint special_tab; }; /* -------------------function definitions-------------------- */ static void search_click( GtkWidget *widget, Data *data ); static void insert_description ( Data *data ); static void get_text_positions ( gchar * input, gchar * delimiter, gint * startpos, gint * endpos ); static void get_text_special_positions ( gchar * input, gchar * delimiter, gint * a, gint * b ); void show_aptitude_toggled_cb( GtkToggleAction * widget, Data *data ); void search_aptitude_toggled_cb( GtkToggleAction * widget, Data *data ); void insert_status ( GtkWidget * widget, Data * data ); void insert_text_special ( gchar * standard_output, Data * data ); void on_cached_files_toggled (GtkToggleAction * widget, Data * data ); void on_package_info_toggled (GtkToggleAction * widget, Data * data ); void on_installed_files_toggled (GtkToggleAction * widget, Data * data );