summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2014-06-21 15:18:34 +0000
committerJason Woodward2014-06-23 20:40:13 -0400
commit21ffb87c7c3772119f5f553af1df1806e1809dc3 (patch)
treef6d70091a7522ae5d1ed3967dc25a8853dd53c97
parent4fcdfa213c1f414946d2005b09dc8af318d75dca (diff)
downloadgslapt-21ffb87c7c3772119f5f553af1df1806e1809dc3.tar.gz
Use gtkbuilder instead of old interface.c code.
-rw-r--r--Makefile.am6
-rw-r--r--configure.in3
-rw-r--r--src/Makefile.am1
-rw-r--r--src/callbacks.c726
-rw-r--r--src/callbacks.h15
-rw-r--r--src/interface.c12
-rw-r--r--src/main.c35
-rw-r--r--ui/Makefile.am19
-rw-r--r--ui/about.ui125
-rw-r--r--ui/changelog_window.ui64
-rw-r--r--ui/dep_error_dialog.ui183
-rw-r--r--ui/dl_progress_window.ui117
-rw-r--r--ui/gslapt.ui1130
-rw-r--r--ui/icon_legend.ui437
-rw-r--r--ui/notification.ui88
-rw-r--r--ui/pkgtools_progress_window.ui69
-rw-r--r--ui/repositories_changed.ui134
-rw-r--r--ui/source_failed_dialog.ui128
-rw-r--r--ui/source_window.ui167
-rw-r--r--ui/transaction_window.ui238
-rw-r--r--ui/window_preferences.ui636
21 files changed, 4025 insertions, 308 deletions
diff --git a/Makefile.am b/Makefile.am
index 6f2ab7a..5180a2c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
## Process this file with automake to produce Makefile.in
-SUBDIRS = src po
+SUBDIRS = src po ui
PKGDIR = `pwd`/pkg
@@ -39,10 +39,10 @@ install-data-local:
$(mkinstalldirs) $(DESTDIR)/$(datadir)/pixmaps; \
$(INSTALL_DATA) pixmaps/gslapt.png $(DESTDIR)/$(datadir)/pixmaps/; \
if test -d $(srcdir)/pixmaps; then \
- $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/pixmaps; \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/ui; \
for pixmap in $(srcdir)/pixmaps/*; do \
if test -f $$pixmap; then \
- $(INSTALL_DATA) $$pixmap $(DESTDIR)$(pkgdatadir)/pixmaps; \
+ $(INSTALL_DATA) $$pixmap $(DESTDIR)$(pkgdatadir)/ui; \
fi \
done \
fi
diff --git a/configure.in b/configure.in
index 4e37c51..45a7613 100644
--- a/configure.in
+++ b/configure.in
@@ -46,7 +46,7 @@ AC_CHECK_MEMBER([slapt_pkg_list_t.pkgs], [LIBS="$LIBS -lslapt"], [AC_MSG_ERROR([
dnl AC_CHECK_LIB(slapt,slapt_disk_space_check, [], [AC_MSG_ERROR(libslapt 0.10.2b or greater is required)])
-glib_modules="glib-2.0 gthread-2.0"
+glib_modules="glib-2.0 gthread-2.0 gmodule-2.0 gmodule-export-2.0"
PKG_CHECK_MODULES(GLIB, [$glib_modules])
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
@@ -64,6 +64,7 @@ AC_CONFIG_FILES([
Makefile
src/Makefile
po/Makefile.in
+ui/Makefile
])
AC_OUTPUT
diff --git a/src/Makefile.am b/src/Makefile.am
index abca90d..1ba6c80 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -5,7 +5,6 @@ sbin_PROGRAMS = gslapt
gslapt_SOURCES = \
main.c \
support.c support.h \
- interface.c interface.h \
callbacks.c callbacks.h \
series.c series.h \
settings.c settings.h
diff --git a/src/callbacks.c b/src/callbacks.c
index 28ae6f2..8c8e6fb 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -31,6 +31,7 @@
#include "series.h"
extern GtkWidget *gslapt;
+extern GtkBuilder *gslapt_builder;
extern GslaptSettings *gslapt_settings;
extern GHashTable *gslapt_series_map;
extern slapt_rc_config *global_config;
@@ -41,7 +42,9 @@ extern char rc_location[];
static GtkWidget *progress_window;
+static GtkBuilder *progress_window_builder = NULL;
static GtkWidget *preferences_window;
+static GtkBuilder *preferences_window_builder = NULL;
G_LOCK_DEFINE_STATIC (_cancelled);
static volatile guint _cancelled = 0;
static gboolean sources_modified = FALSE;
@@ -67,7 +70,7 @@ static void build_sources_treeviewlist (GtkWidget *treeview);
static void build_verification_sources_treeviewlist (GtkWidget *treeview);
#endif
static void build_exclude_treeviewlist (GtkWidget *treeview);
-static int populate_transaction_window (GtkWidget *trans_window);
+static int populate_transaction_window (GtkBuilder *b);
char *download_packages (void);
static gboolean install_packages (void);
static void set_execute_active (void);
@@ -78,8 +81,8 @@ static int ladd_deps_to_trans (slapt_transaction_t *tran, slapt_pkg_list_t *avai
slapt_pkg_list_t *installed_pkgs, slapt_pkg_info_t *pkg);
static gboolean toggle_source_status (GtkTreeView *treeview, gpointer data);
static void display_dep_error_dialog (slapt_pkg_info_t *pkg,guint m, guint c);
-static void exclude_dep_error_callback (GtkObject *object, gpointer *user_data);
-static void install_dep_error_callback (GtkObject *object, gpointer *user_data);
+static void exclude_dep_error_callback (GObject *object, gpointer *user_data);
+static void install_dep_error_callback (GObject *object, gpointer *user_data);
static void view_installed_or_available_packages (gboolean show_installed, gboolean show_available);
static int set_iter_for_install(GtkTreeModel *model, GtkTreeIter *iter,
@@ -100,7 +103,7 @@ static gint convert_slapt_priority_to_gslapt_priority(SLAPT_PRIORITY_T p);
gboolean gslapt_window_resized(GtkWindow *window, GdkEvent *event, gpointer data)
{
- const char *widget_name = gtk_widget_get_name(GTK_WIDGET(window));
+ const char *widget_name = gtk_buildable_get_name(GTK_BUILDABLE(window));
gint x, y, width, height;
x = event->configure.x;
@@ -135,7 +138,7 @@ gboolean gslapt_window_resized(GtkWindow *window, GdkEvent *event, gpointer data
return FALSE;
}
-void on_gslapt_destroy (GtkObject *object, gpointer *user_data)
+void on_gslapt_destroy (GObject *object, gpointer *user_data)
{
slapt_free_transaction(trans);
slapt_free_pkg_list(all);
@@ -150,7 +153,7 @@ void on_gslapt_destroy (GtkObject *object, gpointer *user_data)
exit(0);
}
-void update_callback (GtkObject *object, gpointer *user_data)
+void update_callback (GObject *object, gpointer *user_data)
{
GThread *gpd;
@@ -165,7 +168,7 @@ void update_callback (GtkObject *object, gpointer *user_data)
return;
}
-void upgrade_callback (GtkObject *object, gpointer *user_data)
+void upgrade_callback (GObject *object, gpointer *user_data)
{
set_busy_cursor();
mark_upgrade_packages();
@@ -175,8 +178,9 @@ void upgrade_callback (GtkObject *object, gpointer *user_data)
unset_busy_cursor();
}
-void execute_callback (GtkObject *object, gpointer *user_data)
+void execute_callback (GObject *object, gpointer *user_data)
{
+ GtkBuilder *builder;
GtkWidget *trans_window;
if (
@@ -185,7 +189,11 @@ void execute_callback (GtkObject *object, gpointer *user_data)
&& trans->remove_pkgs->pkg_count == 0
) return;
- trans_window = (GtkWidget *)create_transaction_window();
+ builder = gtk_builder_new ();
+ gslapt_load_ui (builder, "transaction_window.ui");
+ trans_window = GTK_WIDGET (gtk_builder_get_object (builder, "transaction_window"));
+ gtk_builder_connect_signals (builder, builder);
+
if ((gslapt_settings->tran_x == gslapt_settings->tran_y == gslapt_settings->tran_width == gslapt_settings->tran_height == 0)) {
gtk_window_set_default_size(GTK_WINDOW(trans_window),
@@ -194,8 +202,8 @@ void execute_callback (GtkObject *object, gpointer *user_data)
gslapt_settings->tran_x, gslapt_settings->tran_y);
}
- if ( populate_transaction_window(trans_window) == 0 ) {
- gtk_widget_show(trans_window);
+ if ( populate_transaction_window(builder) == 0 ) {
+ gtk_widget_show_all(trans_window);
} else {
gtk_widget_destroy(trans_window);
}
@@ -210,7 +218,13 @@ void open_preferences (GtkMenuItem *menuitem, gpointer *user_data)
GtkTreeView *verification_source_tree;
#endif
- preferences = (GtkWidget *)create_window_preferences();
+ if (preferences_window_builder == NULL)
+ preferences_window_builder = gtk_builder_new ();
+
+ gslapt_load_ui (preferences_window_builder, "window_preferences.ui");
+ preferences = GTK_WIDGET (gtk_builder_get_object (preferences_window_builder, "window_preferences"));
+ gtk_builder_connect_signals (preferences_window_builder, preferences_window_builder);
+
if ((gslapt_settings->pref_x == gslapt_settings->pref_y == gslapt_settings->pref_width == gslapt_settings->pref_height == 0)) {
gtk_window_set_default_size(GTK_WINDOW(preferences),
@@ -219,21 +233,21 @@ void open_preferences (GtkMenuItem *menuitem, gpointer *user_data)
gslapt_settings->pref_x, gslapt_settings->pref_y);
}
- working_dir = GTK_ENTRY(lookup_widget(preferences,"preferences_working_dir_entry"));
+ working_dir = GTK_ENTRY(gtk_builder_get_object(preferences_window_builder,"preferences_working_dir_entry"));
gtk_entry_set_text(working_dir,global_config->working_dir);
- source_tree = GTK_TREE_VIEW(lookup_widget(preferences,"preferences_sources_treeview"));
+ source_tree = GTK_TREE_VIEW(gtk_builder_get_object(preferences_window_builder,"preferences_sources_treeview"));
build_sources_treeviewlist((GtkWidget *)source_tree);
#ifdef SLAPT_HAS_GPGME
- verification_source_tree = GTK_TREE_VIEW(lookup_widget(preferences,"preferences_verification_sources_treeview"));
+ verification_source_tree = GTK_TREE_VIEW(gtk_builder_get_object(preferences_window_builder,"preferences_verification_sources_treeview"));
build_verification_sources_treeviewlist((GtkWidget *)verification_source_tree);
#endif
- exclude_tree = GTK_TREE_VIEW(lookup_widget(preferences,"preferences_exclude_treeview"));
+ exclude_tree = GTK_TREE_VIEW(gtk_builder_get_object(preferences_window_builder,"preferences_exclude_treeview"));
build_exclude_treeviewlist((GtkWidget *)exclude_tree);
- gtk_widget_show(preferences);
+ gtk_widget_show_all(preferences);
preferences_window = preferences;
}
@@ -241,9 +255,9 @@ void search_activated (GtkWidget *gslapt, gpointer *user_data)
{
gboolean valid = FALSE, exists = FALSE;
GtkTreeIter iter;
- GtkTreeView *treeview = GTK_TREE_VIEW(lookup_widget(gslapt,"pkg_listing_treeview"));
- gchar *pattern = (gchar *)gtk_entry_get_text(GTK_ENTRY(lookup_widget(gslapt,"search_entry")));
- GtkEntryCompletion *completion = gtk_entry_get_completion(GTK_ENTRY(lookup_widget(gslapt,"search_entry")));
+ GtkTreeView *treeview = GTK_TREE_VIEW(gtk_builder_get_object(gslapt_builder,"pkg_listing_treeview"));
+ gchar *pattern = (gchar *)gtk_entry_get_text(GTK_ENTRY(gtk_builder_get_object(gslapt_builder,"search_entry")));
+ GtkEntryCompletion *completion = gtk_entry_get_completion(GTK_ENTRY(gtk_builder_get_object(gslapt_builder,"search_entry")));
GtkTreeModel *completions = gtk_entry_completion_get_model(completion);
build_searched_treeviewlist(GTK_WIDGET(treeview),pattern);
@@ -282,7 +296,7 @@ void add_pkg_for_install (GtkWidget *gslapt, gpointer *user_data)
GtkTreeModelFilter *filter_model;
GtkTreeModelSort *package_model;
- treeview = GTK_TREE_VIEW(lookup_widget(gslapt,"pkg_listing_treeview"));
+ treeview = GTK_TREE_VIEW(gtk_builder_get_object(gslapt_builder,"pkg_listing_treeview"));
selection = gtk_tree_view_get_selection(treeview);
package_model = GTK_TREE_MODEL_SORT(gtk_tree_view_get_model(treeview));
@@ -453,7 +467,7 @@ void add_pkg_for_removal (GtkWidget *gslapt, gpointer *user_data)
GtkTreeSelection *selection;
GtkTreeModelSort *package_model;
- treeview = GTK_TREE_VIEW(lookup_widget(gslapt,"pkg_listing_treeview"));
+ treeview = GTK_TREE_VIEW(gtk_builder_get_object(gslapt_builder,"pkg_listing_treeview"));
selection = gtk_tree_view_get_selection(treeview);
package_model = GTK_TREE_MODEL_SORT(gtk_tree_view_get_model(treeview));
@@ -569,31 +583,31 @@ void build_package_treeviewlist (GtkWidget *treeview)
/* if it's excluded */
if ((slapt_get_exact_pkg(trans->exclude_pkgs,all->pkgs[i]->name, all->pkgs[i]->version) != NULL) ||
slapt_is_excluded(global_config,all->pkgs[i]) == 1) {
- status_icon = create_pixbuf("pkg_action_available_excluded.png");
+ status_icon = gslapt_img("pkg_action_available_excluded.png");
} else {
- status_icon = create_pixbuf("pkg_action_available.png");
+ status_icon = gslapt_img("pkg_action_available.png");
}
status = g_strdup_printf("z%s",all->pkgs[i]->name);
location = all->pkgs[i]->location;
} else if (slapt_get_exact_pkg(trans->remove_pkgs,all->pkgs[i]->name, all->pkgs[i]->version) != NULL) {
- status_icon = create_pixbuf("pkg_action_remove.png");
+ status_icon = gslapt_img("pkg_action_remove.png");
status = g_strdup_printf("r%s",all->pkgs[i]->name);
location = all->pkgs[i]->location;
} else if (slapt_get_exact_pkg(trans->install_pkgs,all->pkgs[i]->name, all->pkgs[i]->version) != NULL) {
- status_icon = create_pixbuf("pkg_action_install.png");
+ status_icon = gslapt_img("pkg_action_install.png");
status = g_strdup_printf("i%s",all->pkgs[i]->name);
location = all->pkgs[i]->location;
} else if (lsearch_upgrade_transaction(trans,all->pkgs[i]) != NULL) {
- status_icon = create_pixbuf("pkg_action_upgrade.png");
+ status_icon = gslapt_img("pkg_action_upgrade.png");
status = g_strdup_printf("u%s",all->pkgs[i]->name);
location = all->pkgs[i]->location;
} else if (is_inst) {
/* if it's excluded */
if ((slapt_get_exact_pkg(trans->exclude_pkgs,all->pkgs[i]->name, all->pkgs[i]->version) != NULL) ||
slapt_is_excluded(global_config,all->pkgs[i]) == 1) {
- status_icon = create_pixbuf("pkg_action_installed_excluded.png");
+ status_icon = gslapt_img("pkg_action_installed_excluded.png");
} else {
- status_icon = create_pixbuf("pkg_action_installed.png");
+ status_icon = gslapt_img("pkg_action_installed.png");
}
status = g_strdup_printf("a%s",all->pkgs[i]->name);
location = installed_pkg->location;
@@ -601,9 +615,9 @@ void build_package_treeviewlist (GtkWidget *treeview)
/* if it's excluded */
if ((slapt_get_exact_pkg(trans->exclude_pkgs,all->pkgs[i]->name, all->pkgs[i]->version) != NULL) ||
slapt_is_excluded(global_config,all->pkgs[i]) == 1) {
- status_icon = create_pixbuf("pkg_action_available_excluded.png");
+ status_icon = gslapt_img("pkg_action_available_excluded.png");
} else {
- status_icon = create_pixbuf("pkg_action_available.png");
+ status_icon = gslapt_img("pkg_action_available.png");
}
status = g_strdup_printf("z%s",all->pkgs[i]->name);
location = all->pkgs[i]->location;
@@ -646,15 +660,15 @@ void build_package_treeviewlist (GtkWidget *treeview)
gchar *short_desc = slapt_gen_short_pkg_description(installed->pkgs[i]);
if (slapt_get_exact_pkg(trans->remove_pkgs,installed->pkgs[i]->name, installed->pkgs[i]->version) != NULL) {
- status_icon = create_pixbuf("pkg_action_remove.png");
+ status_icon = gslapt_img("pkg_action_remove.png");
status = g_strdup_printf("r%s",installed->pkgs[i]->name);
} else {
/* if it's excluded */
if ((slapt_get_exact_pkg(trans->exclude_pkgs,installed->pkgs[i]->name, installed->pkgs[i]->version) != NULL) ||
slapt_is_excluded(global_config,installed->pkgs[i]) == 1) {
- status_icon = create_pixbuf("pkg_action_installed_excluded.png");
+ status_icon = gslapt_img("pkg_action_installed_excluded.png");
} else {
- status_icon = create_pixbuf("pkg_action_installed.png");
+ status_icon = gslapt_img("pkg_action_installed.png");
}
status = g_strdup_printf("a%s",installed->pkgs[i]->name);
}
@@ -687,7 +701,7 @@ void build_package_treeviewlist (GtkWidget *treeview)
package_model = GTK_TREE_MODEL_SORT(gtk_tree_model_sort_new_with_model(GTK_TREE_MODEL(filter_model)));
gtk_tree_view_set_model (GTK_TREE_VIEW(treeview),GTK_TREE_MODEL(package_model));
- if (gslapt->window != NULL) {
+ if (gtk_widget_get_window(gslapt) != NULL) {
unset_busy_cursor();
}
}
@@ -717,11 +731,11 @@ void build_searched_treeviewlist (GtkWidget *treeview, gchar *pattern)
filter_model = GTK_TREE_MODEL_FILTER(gtk_tree_model_sort_get_model(GTK_TREE_MODEL_SORT(package_model)));
base_model = GTK_TREE_MODEL(gtk_tree_model_filter_get_model(GTK_TREE_MODEL_FILTER(filter_model)));
- view_list_all = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(lookup_widget(gslapt,"view_all_packages_menu")));
- view_list_available = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(lookup_widget(gslapt,"view_available_packages_menu")));
- view_list_installed = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(lookup_widget(gslapt,"view_installed_packages_menu")));
- view_list_marked = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(lookup_widget(gslapt,"view_marked_packages_menu")));
- view_list_upgradeable = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(lookup_widget(gslapt,"view_upgradeable_packages_menu")));
+ view_list_all = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(gtk_builder_get_object(gslapt_builder,"view_all_packages_menu")));
+ view_list_available = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(gtk_builder_get_object(gslapt_builder,"view_available_packages_menu")));
+ view_list_installed = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(gtk_builder_get_object(gslapt_builder,"view_installed_packages_menu")));
+ view_list_marked = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(gtk_builder_get_object(gslapt_builder,"view_marked_packages_menu")));
+ view_list_upgradeable = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(gtk_builder_get_object(gslapt_builder,"view_upgradeable_packages_menu")));
a_matches = slapt_search_pkg_list(all,pattern);
i_matches = slapt_search_pkg_list(installed,pattern);
@@ -784,14 +798,21 @@ void build_searched_treeviewlist (GtkWidget *treeview, gchar *pattern)
}
-void open_about (GtkObject *object, gpointer *user_data)
+void open_about (GObject *object, gpointer *user_data)
{
+ GtkBuilder *builder;
GtkWidget *about;
- about = (GtkWidget *)create_about();
- gtk_label_set_text(GTK_LABEL(lookup_widget(about,"label146")),
+
+ builder = gtk_builder_new ();
+ gslapt_load_ui (builder, "about.ui");
+ about = GTK_WIDGET (gtk_builder_get_object (builder, "about"));
+ gtk_builder_connect_signals (builder, NULL);
+
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(builder,"label146")),
"<span weight=\"bold\" size=\"xx-large\">" PACKAGE " " VERSION "</span>");
- gtk_label_set_use_markup(GTK_LABEL(lookup_widget(about,"label146")),TRUE);
- gtk_widget_show (about);
+ gtk_label_set_use_markup(GTK_LABEL(gtk_builder_get_object (builder,"label146")),TRUE);
+ g_object_unref (G_OBJECT (builder));
+ gtk_widget_show_all (about);
}
void show_pkg_details (GtkTreeSelection *selection, gpointer data)
@@ -800,7 +821,7 @@ void show_pkg_details (GtkTreeSelection *selection, gpointer data)
GtkTreeModelSort *package_model;
GtkTreeView *treeview;
- treeview = GTK_TREE_VIEW(lookup_widget(gslapt,"pkg_listing_treeview"));
+ treeview = GTK_TREE_VIEW(gtk_builder_get_object(gslapt_builder,"pkg_listing_treeview"));
package_model = GTK_TREE_MODEL_SORT(gtk_tree_view_get_model(treeview));
if (gtk_tree_selection_get_selected(selection,(GtkTreeModel **)&package_model, &iter)) {
@@ -842,7 +863,7 @@ static void fillin_pkg_details (slapt_pkg_info_t *pkg)
GtkTreeViewColumn *column;
GList *columns;
guint i;
- GtkWidget *treeview = lookup_widget(gslapt,"dep_conf_sug_treeview");
+ GtkWidget *treeview = GTK_WIDGET(gtk_builder_get_object(gslapt_builder,"dep_conf_sug_treeview"));
slapt_pkg_info_t *latest_pkg = slapt_get_newest_pkg(all,pkg->name);
slapt_pkg_info_t *installed_pkg = slapt_get_newest_pkg(installed,pkg->name);
slapt_pkg_upgrade_t *pkg_upgrade = NULL;
@@ -850,26 +871,26 @@ static void fillin_pkg_details (slapt_pkg_info_t *pkg)
const char *priority_str = NULL;
/* set package details */
- gtk_label_set_text(GTK_LABEL(lookup_widget(gslapt,"pkg_info_name")),pkg->name);
- gtk_label_set_text(GTK_LABEL(lookup_widget(gslapt,"pkg_info_version")),pkg->version);
- gtk_label_set_text(GTK_LABEL(lookup_widget(gslapt,"pkg_info_source")),pkg->mirror);
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(gslapt_builder,"pkg_info_name")),pkg->name);
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(gslapt_builder,"pkg_info_version")),pkg->version);
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(gslapt_builder,"pkg_info_source")),pkg->mirror);
short_desc = slapt_gen_short_pkg_description(pkg);
if (short_desc != NULL) {
- gtk_label_set_text(GTK_LABEL(lookup_widget(gslapt,"pkg_info_description")),short_desc);
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(gslapt_builder,"pkg_info_description")),short_desc);
free(short_desc);
} else {
- gtk_label_set_text(GTK_LABEL(lookup_widget(gslapt,"pkg_info_description")),"");
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(gslapt_builder,"pkg_info_description")),"");
}
location = gslapt_series_map_lookup(gslapt_series_map, pkg->location);
if (location != NULL) {
- gtk_label_set_text(GTK_LABEL(lookup_widget(gslapt,"pkg_info_location")),location);
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(gslapt_builder,"pkg_info_location")),location);
free(location);
} else {
- gtk_label_set_text(GTK_LABEL(lookup_widget(gslapt,"pkg_info_location")),pkg->location);
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(gslapt_builder,"pkg_info_location")),pkg->location);
}
priority_str = slapt_priority_to_str(pkg->priority);
- gtk_label_set_text(GTK_LABEL(lookup_widget(gslapt,"pkg_info_priority")),priority_str);
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(gslapt_builder,"pkg_info_priority")),priority_str);
/* dependency information tab */
store = gtk_tree_store_new(1,G_TYPE_STRING);
@@ -951,7 +972,7 @@ static void fillin_pkg_details (slapt_pkg_info_t *pkg)
gtk_tree_view_expand_all(GTK_TREE_VIEW(treeview));
/* description tab */
- pkg_full_desc = gtk_text_view_get_buffer(GTK_TEXT_VIEW(lookup_widget(gslapt,"pkg_description_textview")));
+ pkg_full_desc = gtk_text_view_get_buffer(GTK_TEXT_VIEW(gtk_builder_get_object(gslapt_builder,"pkg_description_textview")));
clean_desc = strdup(pkg->description);
slapt_clean_description(clean_desc,pkg->name);
gtk_text_buffer_set_text(pkg_full_desc, clean_desc, -1);
@@ -960,7 +981,7 @@ static void fillin_pkg_details (slapt_pkg_info_t *pkg)
free(clean_desc);
/* changelog tab */
- pkg_changelog = gtk_text_view_get_buffer(GTK_TEXT_VIEW(lookup_widget(gslapt,"pkg_changelog_textview")));
+ pkg_changelog = gtk_text_view_get_buffer(GTK_TEXT_VIEW(gtk_builder_get_object(gslapt_builder,"pkg_changelog_textview")));
if ((changelog = slapt_get_pkg_changelog(pkg)) != NULL) {
if (!g_utf8_validate(changelog, -1, NULL)) {
char *converted = g_convert(changelog, strlen(changelog), "UTF-8", "ISO-8859-1", NULL, NULL, NULL);
@@ -976,7 +997,7 @@ static void fillin_pkg_details (slapt_pkg_info_t *pkg)
}
/* file list tab */
- pkg_filelist = gtk_text_view_get_buffer(GTK_TEXT_VIEW(lookup_widget(gslapt,"pkg_filelist_textview")));
+ pkg_filelist = gtk_text_view_get_buffer(GTK_TEXT_VIEW(gtk_builder_get_object(gslapt_builder,"pkg_filelist_textview")));
if ((filelist = slapt_get_pkg_filelist(pkg)) != NULL) {
if (!g_utf8_validate(filelist, -1, NULL)) {
char *converted = g_convert(filelist, strlen(filelist), "UTF-8", "ISO-8859-1", NULL, NULL, NULL);
@@ -994,39 +1015,39 @@ static void fillin_pkg_details (slapt_pkg_info_t *pkg)
/* set status */
if ((slapt_get_exact_pkg(trans->exclude_pkgs,pkg->name,pkg->version) != NULL) ||
slapt_is_excluded(global_config,pkg) == 1) {
- gtk_label_set_text(GTK_LABEL(lookup_widget(gslapt,"pkg_info_status")),(gchar *)_("Excluded"));
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(gslapt_builder,"pkg_info_status")),(gchar *)_("Excluded"));
} else if (slapt_get_exact_pkg(trans->remove_pkgs,pkg->name,pkg->version) != NULL) {
- gtk_label_set_text(GTK_LABEL(lookup_widget(gslapt,"pkg_info_status")),(gchar *)_("To be Removed"));
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(gslapt_builder,"pkg_info_status")),(gchar *)_("To be Removed"));
} else if (slapt_get_exact_pkg(trans->install_pkgs,pkg->name,pkg->version) != NULL) {
- gtk_label_set_text(GTK_LABEL(lookup_widget(gslapt,"pkg_info_status")),(gchar *)_("To be Installed"));
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(gslapt_builder,"pkg_info_status")),(gchar *)_("To be Installed"));
} else if ( (pkg_upgrade = lsearch_upgrade_transaction(trans,pkg)) != NULL) {
if (slapt_cmp_pkgs(pkg, pkg_upgrade->installed) == 0 &&
slapt_cmp_pkg_versions(pkg_upgrade->upgrade->version,pkg_upgrade->installed->version) == 0) {
- gtk_label_set_text(GTK_LABEL(lookup_widget(gslapt,"pkg_info_status")),(gchar *)_("To be Re-Installed"));
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(gslapt_builder,"pkg_info_status")),(gchar *)_("To be Re-Installed"));
} else if (slapt_cmp_pkgs(latest_pkg, pkg_upgrade->upgrade) > 0 && slapt_cmp_pkg_versions(pkg->version, pkg_upgrade->upgrade->version) > 0) {
- gtk_label_set_text(GTK_LABEL(lookup_widget(gslapt,"pkg_info_status")),(gchar *)_("To be Downgraded"));
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(gslapt_builder,"pkg_info_status")),(gchar *)_("To be Downgraded"));
} else if (slapt_cmp_pkgs(pkg, pkg_upgrade->upgrade) < 0) {
- gtk_label_set_text(GTK_LABEL(lookup_widget(gslapt,"pkg_info_status")),(gchar *)_("To be Upgraded"));
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(gslapt_builder,"pkg_info_status")),(gchar *)_("To be Upgraded"));
} else if (slapt_cmp_pkgs(pkg, pkg_upgrade->upgrade) == 0) {
- gtk_label_set_text(GTK_LABEL(lookup_widget(gslapt,"pkg_info_status")),(gchar *)_("To be Installed"));
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(gslapt_builder,"pkg_info_status")),(gchar *)_("To be Installed"));
} else if (slapt_cmp_pkgs(pkg, pkg_upgrade->upgrade) > 0) {
- gtk_label_set_text(GTK_LABEL(lookup_widget(gslapt,"pkg_info_status")),(gchar *)_("To be Downgraded"));
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(gslapt_builder,"pkg_info_status")),(gchar *)_("To be Downgraded"));
}
} else if (slapt_get_exact_pkg(installed,pkg->name,pkg->version) != NULL) {
- gtk_label_set_text(GTK_LABEL(lookup_widget(gslapt,"pkg_info_status")),(gchar *)_("Installed"));
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(gslapt_builder,"pkg_info_status")),(gchar *)_("Installed"));
} else {
- gtk_label_set_text(GTK_LABEL(lookup_widget(gslapt,"pkg_info_status")),(gchar *)_("Not Installed"));
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(gslapt_builder,"pkg_info_status")),(gchar *)_("Not Installed"));
}
/* set installed info */
if (installed_pkg != NULL) {
gchar size_u[20];
sprintf(size_u,"%d K",installed_pkg->size_u);
- gtk_label_set_text(GTK_LABEL(lookup_widget(gslapt,"pkg_info_installed_installed_size")),size_u);
- gtk_label_set_text(GTK_LABEL(lookup_widget(gslapt,"pkg_info_installed_version")),installed_pkg->version);
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(gslapt_builder,"pkg_info_installed_installed_size")),size_u);
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(gslapt_builder,"pkg_info_installed_version")),installed_pkg->version);
} else {
- gtk_label_set_text(GTK_LABEL(lookup_widget(gslapt,"pkg_info_installed_installed_size")),"");
- gtk_label_set_text(GTK_LABEL(lookup_widget(gslapt,"pkg_info_installed_version")),"");
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(gslapt_builder,"pkg_info_installed_installed_size")),"");
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(gslapt_builder,"pkg_info_installed_version")),"");
}
/* set latest available info */
@@ -1034,15 +1055,15 @@ static void fillin_pkg_details (slapt_pkg_info_t *pkg)
gchar latest_size_c[20],latest_size_u[20];
sprintf(latest_size_c,"%d K",latest_pkg->size_c);
sprintf(latest_size_u,"%d K",latest_pkg->size_u);
- gtk_label_set_text(GTK_LABEL(lookup_widget(gslapt,"pkg_info_available_version")),latest_pkg->version);
- gtk_label_set_text(GTK_LABEL(lookup_widget(gslapt,"pkg_info_available_source")),latest_pkg->mirror);
- gtk_label_set_text(GTK_LABEL(lookup_widget(gslapt,"pkg_info_available_size")),latest_size_c);
- gtk_label_set_text(GTK_LABEL(lookup_widget(gslapt,"pkg_info_available_installed_size")),latest_size_u);
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(gslapt_builder,"pkg_info_available_version")),latest_pkg->version);
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(gslapt_builder,"pkg_info_available_source")),latest_pkg->mirror);
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(gslapt_builder,"pkg_info_available_size")),latest_size_c);
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(gslapt_builder,"pkg_info_available_installed_size")),latest_size_u);
} else {
- gtk_label_set_text(GTK_LABEL(lookup_widget(gslapt,"pkg_info_available_version")),"");
- gtk_label_set_text(GTK_LABEL(lookup_widget(gslapt,"pkg_info_available_source")),"");
- gtk_label_set_text(GTK_LABEL(lookup_widget(gslapt,"pkg_info_available_size")),"");
- gtk_label_set_text(GTK_LABEL(lookup_widget(gslapt,"pkg_info_available_installed_size")),"");
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(gslapt_builder,"pkg_info_available_version")),"");
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(gslapt_builder,"pkg_info_available_source")),"");
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(gslapt_builder,"pkg_info_available_size")),"");
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(gslapt_builder,"pkg_info_available_installed_size")),"");
}
}
@@ -1060,17 +1081,23 @@ static void get_package_data (void)
slapt_pkg_list_t *new_pkgs = slapt_init_pkg_list();
new_pkgs->free_pkgs = TRUE;
- progress_window = create_dl_progress_window();
+ if (progress_window_builder == NULL)
+ progress_window_builder = gtk_builder_new ();
+
+ gslapt_load_ui (progress_window_builder, "dl_progress_window.ui");
+ progress_window = GTK_WIDGET (gtk_builder_get_object (progress_window_builder, "dl_progress_window"));
+ gtk_builder_connect_signals (progress_window_builder, NULL);
+
gtk_window_set_title(GTK_WINDOW(progress_window),(gchar *)_("Progress"));
- p_bar = GTK_PROGRESS_BAR(lookup_widget(progress_window,"progress_progressbar"));
- dl_bar = GTK_PROGRESS_BAR(lookup_widget(progress_window,"dl_progress"));
- progress_action_label = GTK_LABEL(lookup_widget(progress_window,"progress_action"));
- progress_message_label = GTK_LABEL(lookup_widget(progress_window,"progress_message"));
+ p_bar = GTK_PROGRESS_BAR(gtk_builder_get_object (progress_window_builder,"dl_progress_progressbar"));
+ dl_bar = GTK_PROGRESS_BAR(gtk_builder_get_object (progress_window_builder,"dl_progress"));
+ progress_action_label = GTK_LABEL(gtk_builder_get_object (progress_window_builder,"dl_progress_action"));
+ progress_message_label = GTK_LABEL(gtk_builder_get_object (progress_window_builder,"dl_progress_message"));
gdk_threads_enter();
lock_toolbar_buttons();
context_id = gslapt_set_status((gchar *)_("Checking for new package data..."));
- gtk_widget_show(progress_window);
+ gtk_widget_show_all(progress_window);
gdk_threads_leave();
#ifdef SLAPT_HAS_GPGME
@@ -1144,12 +1171,20 @@ static void get_package_data (void)
gslapt_clear_status(context_id);
} else {
/* prompt the user to continue downloading package sources */
- GtkWidget *q = create_source_failed_dialog();
+ GtkBuilder * builder = gtk_builder_new ();
+ GtkWidget *q;
+
+ gslapt_load_ui (builder, "source_failed_dialog.ui");
+ q = GTK_WIDGET (gtk_builder_get_object (builder, "source_failed_dialog"));
+ gtk_builder_connect_signals (builder, NULL);
+
gtk_label_set_text(
- GTK_LABEL(lookup_widget(q,"failed_source_label")),
+ GTK_LABEL(gtk_builder_get_object (builder,"failed_source_label")),
global_config->sources->src[i]->url
);
+ gtk_widget_show_all(q);
+
gint result = gtk_dialog_run(GTK_DIALOG(q));
if (result == GTK_RESPONSE_YES) {
/* we'll disable this source and continue on */
@@ -1163,6 +1198,7 @@ static void get_package_data (void)
gslapt_clear_status(context_id);
}
gtk_widget_destroy(q);
+ g_object_unref (G_OBJECT (builder));
}
@@ -1405,18 +1441,21 @@ static void get_package_data (void)
trans = slapt_init_transaction();
gdk_threads_enter();
+ gtk_widget_destroy(progress_window);
+ gslapt_clear_status(context_id);
unlock_toolbar_buttons();
rebuild_treeviews(progress_window,TRUE);
- gslapt_clear_status(context_id);
- gtk_widget_destroy(progress_window);
gdk_threads_leave();
+ g_object_unref (G_OBJECT (progress_window_builder));
+ progress_window_builder = NULL;
+
}
int gtk_progress_callback(void *data, double dltotal, double dlnow,
double ultotal, double ulnow)
{
- GtkProgressBar *p_bar = GTK_PROGRESS_BAR(lookup_widget(progress_window,"dl_progress"));
+ GtkProgressBar *p_bar = GTK_PROGRESS_BAR(gtk_builder_get_object(progress_window_builder,"dl_progress"));
double perc = 1.0;
struct slapt_progress_data *cb_data = (struct slapt_progress_data *)data;
time_t now = time(NULL);
@@ -1441,7 +1480,7 @@ int gtk_progress_callback(void *data, double dltotal, double dlnow,
gdk_threads_enter();
gtk_progress_bar_set_fraction(p_bar,perc);
- gtk_label_set_text(GTK_LABEL(lookup_widget(progress_window,"progress_dl_speed")),status);
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(progress_window_builder,"progress_dl_speed")),status);
gdk_threads_leave();
g_free(status);
@@ -1456,7 +1495,7 @@ static void rebuild_treeviews (GtkWidget *current_window,gboolean reload)
GtkTreeModelFilter *filter_model;
GtkTreeModelSort *package_model;
const gchar *search_text = gtk_entry_get_text(
- GTK_ENTRY(lookup_widget(gslapt,"search_entry")));
+ GTK_ENTRY(gtk_builder_get_object(gslapt_builder,"search_entry")));
set_busy_cursor();
@@ -1473,7 +1512,7 @@ static void rebuild_treeviews (GtkWidget *current_window,gboolean reload)
slapt_free_pkg_list(all_ptr);
}
- treeview = (GtkWidget *)lookup_widget(gslapt,"pkg_listing_treeview");
+ treeview = (GtkWidget *)gtk_builder_get_object(gslapt_builder,"pkg_listing_treeview");
package_model = GTK_TREE_MODEL_SORT(gtk_tree_view_get_model(GTK_TREE_VIEW(treeview)));
filter_model = GTK_TREE_MODEL_FILTER(gtk_tree_model_sort_get_model(GTK_TREE_MODEL_SORT(package_model)));
@@ -1481,11 +1520,11 @@ static void rebuild_treeviews (GtkWidget *current_window,gboolean reload)
gtk_list_store_clear(store);
if (reload == TRUE) {
- gtk_entry_set_text(GTK_ENTRY(lookup_widget(gslapt,"search_entry")),"");
+ gtk_entry_set_text(GTK_ENTRY(gtk_builder_get_object(gslapt_builder,"search_entry")),"");
}
rebuild_package_action_menu();
- gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(lookup_widget(gslapt,"view_all_packages_menu")), TRUE);
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(gtk_builder_get_object(gslapt_builder,"view_all_packages_menu")), TRUE);
build_package_treeviewlist(treeview);
if ((reload == FALSE) && (strcmp(search_text,"") != 0)) {
@@ -1498,7 +1537,7 @@ static void rebuild_treeviews (GtkWidget *current_window,gboolean reload)
static guint gslapt_set_status (const gchar *msg)
{
guint context_id;
- GtkStatusbar *bar = GTK_STATUSBAR(lookup_widget(gslapt,"bottom_statusbar"));
+ GtkStatusbar *bar = GTK_STATUSBAR(gtk_builder_get_object(gslapt_builder,"bottom_statusbar"));
context_id = gtk_statusbar_get_context_id(bar,msg);
gtk_statusbar_push(bar,context_id,msg);
@@ -1508,27 +1547,27 @@ static guint gslapt_set_status (const gchar *msg)
static void gslapt_clear_status (guint context_id)
{
- GtkStatusbar *bar = GTK_STATUSBAR(lookup_widget(gslapt,"bottom_statusbar"));
+ GtkStatusbar *bar = GTK_STATUSBAR(gtk_builder_get_object(gslapt_builder,"bottom_statusbar"));
gtk_statusbar_pop(bar,context_id);
}
static void lock_toolbar_buttons (void)
{
- gtk_widget_set_sensitive(lookup_widget(gslapt,"top_menubar"),FALSE);
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(gslapt_builder,"top_menubar")),FALSE);
- gtk_widget_set_sensitive(lookup_widget(gslapt,"action_bar_update_button"),FALSE);
- gtk_widget_set_sensitive(lookup_widget(gslapt,"action_bar_upgrade_button"),FALSE);
- gtk_widget_set_sensitive(lookup_widget(gslapt,"action_bar_execute_button"),FALSE);
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(gslapt_builder,"action_bar_update_button")),FALSE);
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(gslapt_builder,"action_bar_upgrade_button")),FALSE);
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(gslapt_builder,"action_bar_execute_button")),FALSE);
}
static void unlock_toolbar_buttons (void)
{
- gtk_widget_set_sensitive(lookup_widget(gslapt,"top_menubar"),TRUE);
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(gslapt_builder,"top_menubar")),TRUE);
- gtk_widget_set_sensitive(lookup_widget(gslapt,"action_bar_update_button"),TRUE);
- gtk_widget_set_sensitive(lookup_widget(gslapt,"action_bar_upgrade_button"),TRUE);
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(gslapt_builder,"action_bar_update_button")),TRUE);
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(gslapt_builder,"action_bar_upgrade_button")),TRUE);
if (
trans->upgrade_pkgs->pkg_count != 0
@@ -1540,7 +1579,7 @@ static void unlock_toolbar_buttons (void)
}
-static void lhandle_transaction (GtkWidget *w)
+static void lhandle_transaction (GtkBuilder *b)
{
GtkCheckButton *dl_only_checkbutton;
gboolean dl_only = FALSE;
@@ -1549,9 +1588,10 @@ static void lhandle_transaction (GtkWidget *w)
gdk_threads_enter();
lock_toolbar_buttons();
- dl_only_checkbutton = GTK_CHECK_BUTTON(lookup_widget(w,"download_only_checkbutton"));
+ dl_only_checkbutton = GTK_CHECK_BUTTON(gtk_builder_get_object(b,"download_only_checkbutton"));
dl_only = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dl_only_checkbutton));
- gtk_widget_destroy(w);
+ gtk_widget_destroy(GTK_WIDGET(gtk_builder_get_object(b,"transaction_window")));
+ g_object_unref (G_OBJECT (b));
gdk_threads_leave();
/* download the pkgs */
@@ -1638,9 +1678,9 @@ void transaction_okbutton_clicked (GtkWidget *w, gpointer *user_data)
GThread *gdp;
#if !GLIB_CHECK_VERSION (2, 31, 0)
- gdp = g_thread_create((GThreadFunc)lhandle_transaction,w,FALSE,NULL);
+ gdp = g_thread_create((GThreadFunc)lhandle_transaction,GTK_BUILDER(user_data),FALSE,NULL);
#else
- gdp = g_thread_new("GslaptTransactionStart", (GThreadFunc)lhandle_transaction,w);
+ gdp = g_thread_new("GslaptTransactionStart", (GThreadFunc)lhandle_transaction,GTK_BUILDER(user_data));
#endif
return;
@@ -1655,8 +1695,8 @@ static void build_sources_treeviewlist(GtkWidget *treeview)
GtkTreeViewColumn *column;
GtkTreeSelection *select;
guint i = 0;
- GdkPixbuf *enabled_status_icon = create_pixbuf("pkg_action_installed.png");
- GdkPixbuf *disabled_status_icon = create_pixbuf("pkg_action_available.png");
+ GdkPixbuf *enabled_status_icon = gslapt_img("pkg_action_installed.png");
+ GdkPixbuf *disabled_status_icon = gslapt_img("pkg_action_available.png");
gboolean enabled = TRUE;
store = gtk_list_store_new (
@@ -1766,7 +1806,7 @@ static void build_exclude_treeviewlist(GtkWidget *treeview)
}
-static int populate_transaction_window (GtkWidget *trans_window)
+static int populate_transaction_window (GtkBuilder *b)
{
GtkTreeView *summary_treeview;
GtkTreeStore *store;
@@ -1778,11 +1818,11 @@ static int populate_transaction_window (GtkWidget *trans_window)
double dl_size = 0,free_space = 0,already_dl_size = 0;
gchar buf[512];
- summary_treeview = GTK_TREE_VIEW(lookup_widget(trans_window,"transaction_summary_treeview"));
+ summary_treeview = GTK_TREE_VIEW(gtk_builder_get_object(b,"transaction_summary_treeview"));
store = gtk_tree_store_new (1,G_TYPE_STRING);
- sum_pkg_num = GTK_LABEL(lookup_widget(trans_window,"summary_pkg_numbers"));
- sum_dl_size = GTK_LABEL(lookup_widget(trans_window,"summary_dl_size"));
- sum_free_space = GTK_LABEL(lookup_widget(trans_window,"summary_free_space"));
+ sum_pkg_num = GTK_LABEL(gtk_builder_get_object(b,"summary_pkg_numbers"));
+ sum_dl_size = GTK_LABEL(gtk_builder_get_object(b,"summary_dl_size"));
+ sum_free_space = GTK_LABEL(gtk_builder_get_object(b,"summary_free_space"));
/* setup the store */
if ( trans->missing_err->err_count > 0 ) {
@@ -2008,7 +2048,7 @@ static void mark_upgrade_packages (void)
GtkTreeModelSort *package_model;
GtkTreeView *treeview;
- treeview = GTK_TREE_VIEW(lookup_widget(gslapt,"pkg_listing_treeview"));
+ treeview = GTK_TREE_VIEW(gtk_builder_get_object(gslapt_builder,"pkg_listing_treeview"));
package_model = GTK_TREE_MODEL_SORT(gtk_tree_view_get_model(treeview));
filter_model = GTK_TREE_MODEL_FILTER(gtk_tree_model_sort_get_model(GTK_TREE_MODEL_SORT(package_model)));
@@ -2094,16 +2134,22 @@ char *download_packages (void)
pkgs_to_dl += trans->install_pkgs->pkg_count;
pkgs_to_dl += trans->upgrade_pkgs->pkg_count;
- progress_window = create_dl_progress_window();
+ if (progress_window_builder == NULL)
+ progress_window_builder = gtk_builder_new ();
+
+ gslapt_load_ui (progress_window_builder, "dl_progress_window.ui");
+ progress_window = GTK_WIDGET (gtk_builder_get_object (progress_window_builder, "dl_progress_window"));
+ gtk_builder_connect_signals (progress_window_builder, NULL);
+
gtk_window_set_title(GTK_WINDOW(progress_window),(gchar *)_("Progress"));
- p_bar = GTK_PROGRESS_BAR(lookup_widget(progress_window,"progress_progressbar"));
- progress_action_label = GTK_LABEL(lookup_widget(progress_window,"progress_action"));
- progress_message_label = GTK_LABEL(lookup_widget(progress_window,"progress_message"));
- progress_pkg_desc = GTK_LABEL(lookup_widget(progress_window,"progress_package_description"));
+ p_bar = GTK_PROGRESS_BAR(gtk_builder_get_object (progress_window_builder,"dl_progress_progressbar"));
+ progress_action_label = GTK_LABEL(gtk_builder_get_object (progress_window_builder,"dl_progress_action"));
+ progress_message_label = GTK_LABEL(gtk_builder_get_object (progress_window_builder,"dl_progress_message"));
+ progress_pkg_desc = GTK_LABEL(gtk_builder_get_object (progress_window_builder,"dl_progress_package_description"));
gdk_threads_enter();
- gtk_widget_show(progress_window);
+ gtk_widget_show_all(progress_window);
context_id = gslapt_set_status((gchar *)_("Downloading packages..."));
gdk_threads_leave();
@@ -2140,8 +2186,8 @@ char *download_packages (void)
gtk_label_set_text(progress_action_label,(gchar *)_("Downloading..."));
gtk_label_set_text(progress_message_label,msg);
gtk_progress_bar_set_fraction(p_bar,((count * 100)/pkgs_to_dl)/100);
- gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(lookup_widget(progress_window,"dl_progress")),0.0);
- gtk_progress_bar_set_text(GTK_PROGRESS_BAR(lookup_widget(progress_window,"dl_progress")),dl_size);
+ gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(gtk_builder_get_object (progress_window_builder,"dl_progress")),0.0);
+ gtk_progress_bar_set_text(GTK_PROGRESS_BAR(gtk_builder_get_object (progress_window_builder,"dl_progress")),dl_size);
gdk_threads_leave();
free(msg);
@@ -2190,8 +2236,8 @@ char *download_packages (void)
gtk_label_set_text(progress_action_label,(gchar *)_("Downloading..."));
gtk_label_set_text(progress_message_label,msg);
gtk_progress_bar_set_fraction(p_bar,((count * 100)/pkgs_to_dl)/100);
- gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(lookup_widget(progress_window,"dl_progress")),0.0);
- gtk_progress_bar_set_text(GTK_PROGRESS_BAR(lookup_widget(progress_window,"dl_progress")),dl_size);
+ gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(gtk_builder_get_object (progress_window_builder,"dl_progress")),0.0);
+ gtk_progress_bar_set_text(GTK_PROGRESS_BAR(gtk_builder_get_object (progress_window_builder,"dl_progress")),dl_size);
gdk_threads_leave();
free(msg);
@@ -2220,11 +2266,16 @@ char *download_packages (void)
gtk_widget_destroy(progress_window);
gslapt_clear_status(context_id);
gdk_threads_leave();
+
+ g_object_unref (G_OBJECT (progress_window_builder));
+ progress_window_builder = NULL;
+
return NULL;
}
static gboolean install_packages (void)
{
+ GtkBuilder *builder = gtk_builder_new ();
GtkLabel *progress_action_label,*progress_message_label,*progress_pkg_desc;
GtkProgressBar *p_bar;
guint i,context_id;
@@ -2232,18 +2283,24 @@ static gboolean install_packages (void)
/* begin removing, installing, and upgrading */
- progress_window = create_pkgtools_progress_window();
+ gslapt_load_ui (builder, "pkgtools_progress_window.ui");
+ progress_window = GTK_WIDGET (gtk_builder_get_object (builder, "pkgtools_progress_window"));
+ gtk_builder_connect_signals (builder, NULL);
+
gtk_window_set_title(GTK_WINDOW(progress_window),(gchar *)_("Progress"));
- p_bar = GTK_PROGRESS_BAR(lookup_widget(progress_window,"progress_progressbar"));
- progress_action_label = GTK_LABEL(lookup_widget(progress_window,"progress_action"));
- progress_message_label = GTK_LABEL(lookup_widget(progress_window,"progress_message"));
- progress_pkg_desc = GTK_LABEL(lookup_widget(progress_window,"progress_package_description"));
+ p_bar = GTK_PROGRESS_BAR(gtk_builder_get_object (builder,"progress_progressbar"));
+ progress_action_label = GTK_LABEL(gtk_builder_get_object (builder,"progress_action"));
+ progress_message_label = GTK_LABEL(gtk_builder_get_object (builder,"progress_message"));
+ progress_pkg_desc = GTK_LABEL(gtk_builder_get_object (builder,"progress_package_description"));
gdk_threads_enter();
- gtk_widget_show(progress_window);
+ gtk_widget_show_all(progress_window);
gdk_threads_leave();
+ g_object_unref (G_OBJECT (builder));
+
+
for (i = 0; i < trans->remove_pkgs->pkg_count;++i) {
char *clean_desc = strdup(trans->remove_pkgs->pkgs[i]->description);
slapt_clean_description(clean_desc,trans->remove_pkgs->pkgs[i]->name);
@@ -2361,17 +2418,25 @@ void clean_callback (GtkWidget *widget, gpointer *user_data)
void preferences_sources_add (GtkWidget *w, gpointer *user_data)
{
- GtkWidget *source_window = create_source_window();
- GtkComboBox *source_priority = GTK_COMBO_BOX(lookup_widget(source_window,"source_priority"));
- gtk_combo_box_set_active (source_priority,0);
- gtk_widget_show(source_window);
+ GtkBuilder *builder;
+ GtkWidget *source_window;
+
+ builder = gtk_builder_new ();
+ gslapt_load_ui (builder, "source_window.ui");
+ source_window = GTK_WIDGET (gtk_builder_get_object (builder, "source_window"));
+ gtk_builder_connect_signals (builder, builder);
+ // g_object_unref (G_OBJECT (builder));
+
+ GtkComboBox *source_priority = GTK_COMBO_BOX(gtk_builder_get_object (builder,"source_priority"));
+
+ gtk_widget_show_all(source_window);
}
void preferences_sources_remove (GtkWidget *w, gpointer *user_data)
{
GtkTreeIter iter;
GtkTreeModel *model;
- GtkTreeView *source_tree = GTK_TREE_VIEW(lookup_widget(w,"preferences_sources_treeview"));
+ GtkTreeView *source_tree = GTK_TREE_VIEW(gtk_builder_get_object(GTK_BUILDER(user_data),"preferences_sources_treeview"));
GtkTreeSelection *select = gtk_tree_view_get_selection (GTK_TREE_VIEW (source_tree));
GtkListStore *store = GTK_LIST_STORE(gtk_tree_view_get_model(source_tree));
@@ -2386,7 +2451,7 @@ void preferences_sources_edit (GtkWidget *w, gpointer *user_data)
{
GtkTreeIter iter;
GtkTreeModel *model;
- GtkTreeView *source_tree = GTK_TREE_VIEW(lookup_widget(w,"preferences_sources_treeview"));
+ GtkTreeView *source_tree = GTK_TREE_VIEW(gtk_builder_get_object(GTK_BUILDER(user_data),"preferences_sources_treeview"));
GtkTreeSelection *select = gtk_tree_view_get_selection (GTK_TREE_VIEW (source_tree));
if ( gtk_tree_selection_get_selected(select,&model,&iter)) {
@@ -2396,14 +2461,23 @@ void preferences_sources_edit (GtkWidget *w, gpointer *user_data)
gtk_tree_model_get(model,&iter,1,&source,4,&priority,-1);
if (source) {
- GtkWidget *source_window = create_source_window();
- GtkEntry *source_entry = GTK_ENTRY(lookup_widget(source_window,"source_entry"));
- GtkComboBox *source_priority = GTK_COMBO_BOX(lookup_widget(source_window,"source_priority"));
+ GtkBuilder *builder = gtk_builder_new ();
+ GtkWidget *source_window;
+ GtkEntry *source_entry;
+ GtkComboBox *source_priority;
+
+ gslapt_load_ui (builder, "source_window.ui");
+ source_window = GTK_WIDGET (gtk_builder_get_object (builder, "source_window"));
+ gtk_builder_connect_signals (builder, builder);
+ // g_object_unref (G_OBJECT (builder));
+
+ source_entry = GTK_ENTRY(gtk_builder_get_object (builder,"source_entry"));
+ source_priority = GTK_COMBO_BOX(gtk_builder_get_object (builder,"source_priority"));
g_object_set_data ( G_OBJECT(source_window), "original_url", source);
gtk_entry_set_text(source_entry,source);
gtk_combo_box_set_active (source_priority,convert_slapt_priority_to_gslapt_priority(priority));
- gtk_widget_show(source_window);
+ gtk_widget_show_all(source_window);
}
}
@@ -2412,7 +2486,7 @@ void preferences_sources_edit (GtkWidget *w, gpointer *user_data)
void preferences_on_ok_clicked (GtkWidget *w, gpointer *user_data)
{
- GtkEntry *preferences_working_dir_entry = GTK_ENTRY(lookup_widget(w,"preferences_working_dir_entry"));
+ GtkEntry *preferences_working_dir_entry = GTK_ENTRY(gtk_builder_get_object(GTK_BUILDER(user_data),"preferences_working_dir_entry"));
const gchar *working_dir = gtk_entry_get_text(preferences_working_dir_entry);
GtkTreeModel *model;
GtkTreeView *tree;
@@ -2434,7 +2508,7 @@ void preferences_on_ok_clicked (GtkWidget *w, gpointer *user_data)
global_config->exclude_list = slapt_init_list();
global_config->sources = slapt_init_source_list();
- tree = GTK_TREE_VIEW(lookup_widget(w,"preferences_sources_treeview"));
+ tree = GTK_TREE_VIEW(gtk_builder_get_object(GTK_BUILDER(user_data),"preferences_sources_treeview"));
model = gtk_tree_view_get_model(tree);
valid = gtk_tree_model_get_iter_first(model,&iter);
while (valid)
@@ -2463,7 +2537,7 @@ void preferences_on_ok_clicked (GtkWidget *w, gpointer *user_data)
valid = gtk_tree_model_iter_next(model, &iter);
}
- tree = GTK_TREE_VIEW(lookup_widget(w,"preferences_exclude_treeview"));
+ tree = GTK_TREE_VIEW(gtk_builder_get_object(GTK_BUILDER(user_data),"preferences_exclude_treeview"));
model = gtk_tree_view_get_model(tree);
valid = gtk_tree_model_get_iter_first(model,&iter);
while (valid)
@@ -2483,15 +2557,25 @@ void preferences_on_ok_clicked (GtkWidget *w, gpointer *user_data)
}
preferences_window = NULL;
- gtk_widget_destroy(w);
+ gtk_widget_destroy(GTK_WIDGET (gtk_builder_get_object (GTK_BUILDER(user_data), "window_preferences")));
+ g_object_unref(G_OBJECT(user_data));
+ preferences_window_builder = NULL;
/* dialog to resync package sources */
if (sources_modified == TRUE) {
+ GtkBuilder *builder = gtk_builder_new ();
+ GtkWidget *rc;
sources_modified = FALSE;
+
if (excludes_modified == TRUE)
excludes_modified = FALSE;
- GtkWidget *rc = create_repositories_changed();
- gtk_widget_show(rc);
+
+ gslapt_load_ui (builder, "repositories_changed.ui");
+ rc = GTK_WIDGET (gtk_builder_get_object (builder, "repositories_changed"));
+ gtk_builder_connect_signals (builder, NULL);
+ g_object_unref (G_OBJECT (builder));
+
+ gtk_widget_show_all(rc);
} else {
/* rebuild package list */
if (excludes_modified == TRUE) {
@@ -2504,9 +2588,9 @@ void preferences_on_ok_clicked (GtkWidget *w, gpointer *user_data)
void preferences_exclude_add(GtkWidget *w, gpointer *user_data)
{
- GtkEntry *new_exclude_entry = GTK_ENTRY(lookup_widget(w,"new_exclude_entry"));
+ GtkEntry *new_exclude_entry = GTK_ENTRY(gtk_builder_get_object(GTK_BUILDER(user_data),"new_exclude_entry"));
const gchar *new_exclude = gtk_entry_get_text(new_exclude_entry);
- GtkTreeView *exclude_tree = GTK_TREE_VIEW(lookup_widget(w,"preferences_exclude_treeview"));
+ GtkTreeView *exclude_tree = GTK_TREE_VIEW(gtk_builder_get_object(GTK_BUILDER(user_data),"preferences_exclude_treeview"));
GtkListStore *store = GTK_LIST_STORE(gtk_tree_view_get_model(exclude_tree));
GtkTreeIter iter;
@@ -2525,7 +2609,7 @@ void preferences_exclude_remove(GtkWidget *w, gpointer *user_data)
{
GtkTreeIter iter;
GtkTreeModel *model;
- GtkTreeView *exclude_tree = GTK_TREE_VIEW(lookup_widget(w,"preferences_exclude_treeview"));
+ GtkTreeView *exclude_tree = GTK_TREE_VIEW(gtk_builder_get_object(GTK_BUILDER(user_data),"preferences_exclude_treeview"));
GtkTreeSelection *select = gtk_tree_view_get_selection (GTK_TREE_VIEW (exclude_tree));
GtkListStore *store = GTK_LIST_STORE(gtk_tree_view_get_model(exclude_tree));
@@ -2539,13 +2623,16 @@ void preferences_exclude_remove(GtkWidget *w, gpointer *user_data)
void cancel_preferences (GtkWidget *w, gpointer *user_data)
{
preferences_window = NULL;
- gtk_widget_destroy(w);
+ gtk_widget_destroy(GTK_WIDGET (gtk_builder_get_object (GTK_BUILDER(user_data), "window_preferences")));
+ g_object_unref(G_OBJECT(user_data));
+ preferences_window_builder = NULL;
}
void cancel_transaction (GtkWidget *w, gpointer *user_data)
{
- gtk_widget_destroy(w);
+ gtk_widget_destroy(GTK_WIDGET(gtk_builder_get_object(GTK_BUILDER(user_data),"transaction_window")));
+ g_object_unref (G_OBJECT (user_data));
}
void add_pkg_for_reinstall (GtkWidget *gslapt, gpointer *user_data)
@@ -2560,9 +2647,9 @@ void add_pkg_for_reinstall (GtkWidget *gslapt, gpointer *user_data)
static void set_execute_active (void)
{
- gtk_widget_set_sensitive(lookup_widget(gslapt,"action_bar_execute_button"),TRUE);
- gtk_widget_set_sensitive(lookup_widget(gslapt,"execute1"),TRUE);
- gtk_widget_set_sensitive(lookup_widget(gslapt,"unmark_all1"),TRUE);
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(gslapt_builder,"action_bar_execute_button")),TRUE);
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(gslapt_builder,"execute1")),TRUE);
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(gslapt_builder,"unmark_all1")),TRUE);
if (pending_trans_context_id == 0) {
pending_trans_context_id = gslapt_set_status((gchar *)_("Pending changes. Click execute when ready."));
@@ -2575,26 +2662,34 @@ static void clear_execute_active (void)
if ( pending_trans_context_id > 0 ) {
gtk_statusbar_pop(
- GTK_STATUSBAR(lookup_widget(gslapt,"bottom_statusbar")),
+ GTK_STATUSBAR(gtk_builder_get_object(gslapt_builder,"bottom_statusbar")),
pending_trans_context_id
);
pending_trans_context_id = 0;
}
- gtk_widget_set_sensitive(lookup_widget(gslapt,"action_bar_execute_button"),FALSE);
- gtk_widget_set_sensitive(lookup_widget(gslapt,"execute1"),FALSE);
- gtk_widget_set_sensitive(lookup_widget(gslapt,"unmark_all1"),FALSE);
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(gslapt_builder,"action_bar_execute_button")),FALSE);
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(gslapt_builder,"execute1")),FALSE);
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(gslapt_builder,"unmark_all1")),FALSE);
}
static void notify (const char *title,const char *message)
{
- GtkWidget *w = create_notification();
+ GtkBuilder *builder;
+ GtkWidget *w;
+
+ builder = gtk_builder_new ();
+ gslapt_load_ui (builder, "notification.ui");
+ w = GTK_WIDGET (gtk_builder_get_object (builder, "notification"));
+ gtk_builder_connect_signals (builder, NULL);
+
gtk_window_set_title (GTK_WINDOW (w), title);
- gtk_label_set_text(GTK_LABEL(lookup_widget(w,"notification_label")),message);
- gtk_label_set_use_markup (GTK_LABEL(lookup_widget(w,"notification_label")),
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(builder,"notification_label")),message);
+ gtk_label_set_use_markup (GTK_LABEL(gtk_builder_get_object(builder,"notification_label")),
TRUE);
- gtk_widget_show(w);
+ g_object_unref (G_OBJECT (builder));
+ gtk_widget_show_all(w);
}
static gboolean pkg_action_popup_menu (GtkTreeView *treeview, gpointer data)
@@ -2604,18 +2699,21 @@ static gboolean pkg_action_popup_menu (GtkTreeView *treeview, gpointer data)
GtkTreeViewColumn *column;
GtkTreePath *path;
+ if (event == NULL)
+ return FALSE;
+
if (event->type != GDK_BUTTON_PRESS)
return FALSE;
if (!gtk_tree_view_get_path_at_pos(treeview,event->x,event->y,&path,&column,NULL,NULL))
return FALSE;
- if (event->button != 3 && (event->button == 1 && strcmp(column->title,(gchar *)_("Status")) != 0))
+ if (event->button != 3 && (event->button == 1 && strcmp(gtk_tree_view_column_get_title(column),(gchar *)_("Status")) != 0))
return FALSE;
gtk_tree_path_free(path);
- menu = GTK_MENU(gtk_menu_item_get_submenu(GTK_MENU_ITEM(lookup_widget(gslapt,"package1"))));
+ menu = GTK_MENU(gtk_menu_item_get_submenu(GTK_MENU_ITEM(gtk_builder_get_object(gslapt_builder,"package1"))));
gtk_menu_popup(
menu,
@@ -2639,7 +2737,7 @@ void unmark_package(GtkWidget *gslapt, gpointer *user_data)
guint is_installed = 0,i;
GtkTreeModelSort *package_model;
- treeview = GTK_TREE_VIEW(lookup_widget(gslapt,"pkg_listing_treeview"));
+ treeview = GTK_TREE_VIEW(gtk_builder_get_object(gslapt_builder,"pkg_listing_treeview"));
selection = gtk_tree_view_get_selection(treeview);
package_model = GTK_TREE_MODEL_SORT(gtk_tree_view_get_model(treeview));
@@ -2697,12 +2795,12 @@ void unmark_package(GtkWidget *gslapt, gpointer *user_data)
model = GTK_TREE_MODEL(gtk_tree_model_filter_get_model(GTK_TREE_MODEL_FILTER(filter_model)));
if (is_installed == 1) {
- GdkPixbuf *status_icon = create_pixbuf("pkg_action_installed.png");
+ GdkPixbuf *status_icon = gslapt_img("pkg_action_installed.png");
gtk_list_store_set(GTK_LIST_STORE(model),&actual_iter,STATUS_ICON_COLUMN,status_icon,-1);
status = g_strdup_printf("a%s",pkg->name);
g_object_unref(status_icon);
} else {
- GdkPixbuf *status_icon = create_pixbuf("pkg_action_available.png");
+ GdkPixbuf *status_icon = gslapt_img("pkg_action_available.png");
gtk_list_store_set(GTK_LIST_STORE(model),&actual_iter,STATUS_ICON_COLUMN,status_icon,-1);
status = g_strdup_printf("z%s",pkg->name);
g_object_unref(status_icon);
@@ -2723,7 +2821,7 @@ void unmark_package(GtkWidget *gslapt, gpointer *user_data)
if (set_iter_to_pkg(model,&actual_iter,installed_pkg)) {
gchar *istatus = g_strdup_printf("i%s",installed_pkg->name);
- GdkPixbuf *status_icon = create_pixbuf("pkg_action_installed.png");
+ GdkPixbuf *status_icon = gslapt_img("pkg_action_installed.png");
gtk_list_store_set(GTK_LIST_STORE(model),&actual_iter,STATUS_ICON_COLUMN,status_icon,-1);
gtk_list_store_set(GTK_LIST_STORE(model),&actual_iter,STATUS_COLUMN,istatus,-1);
gtk_list_store_set(GTK_LIST_STORE(model),&actual_iter,MARKED_COLUMN,FALSE,-1);
@@ -2790,7 +2888,7 @@ static int ladd_deps_to_trans (slapt_transaction_t *tran, slapt_pkg_list_t *avai
return -1;
}
- treeview = GTK_TREE_VIEW(lookup_widget(gslapt,"pkg_listing_treeview"));
+ treeview = GTK_TREE_VIEW(gtk_builder_get_object(gslapt_builder,"pkg_listing_treeview"));
package_model = GTK_TREE_MODEL_SORT(gtk_tree_view_get_model(treeview));
filter_model = GTK_TREE_MODEL_FILTER(gtk_tree_model_sort_get_model(GTK_TREE_MODEL_SORT(package_model)));
@@ -2977,10 +3075,18 @@ static slapt_pkg_upgrade_t *lsearch_upgrade_transaction (slapt_transaction_t *tr
return NULL;
}
-void open_icon_legend (GtkObject *object, gpointer *user_data)
+void open_icon_legend (GObject *object, gpointer *user_data)
{
- GtkWidget *icon_legend = create_icon_legend();
- gtk_widget_show(icon_legend);
+ GtkBuilder *builder;
+ GtkWidget *icon_legend;
+
+ builder = gtk_builder_new ();
+ gslapt_load_ui (builder, "icon_legend.ui");
+ icon_legend = GTK_WIDGET (gtk_builder_get_object (builder, "icon_legend"));
+ gtk_builder_connect_signals (builder, NULL);
+ g_object_unref (G_OBJECT (builder));
+
+ gtk_widget_show_all(icon_legend);
}
@@ -3032,49 +3138,49 @@ static void build_package_action_menu (slapt_pkg_info_t *pkg)
is_exclude = 1;
}
- menu = GTK_MENU(gtk_menu_item_get_submenu(GTK_MENU_ITEM(lookup_widget(gslapt,"package1"))));
+ menu = GTK_MENU(gtk_menu_item_get_submenu(GTK_MENU_ITEM(gtk_builder_get_object(gslapt_builder,"package1"))));
- gtk_widget_set_sensitive(lookup_widget(GTK_WIDGET(menu),"upgrade1"),FALSE);
- gtk_widget_set_sensitive(lookup_widget(GTK_WIDGET(menu),"re_install1"),FALSE);
- gtk_widget_set_sensitive(lookup_widget(GTK_WIDGET(menu),"downgrade1"),FALSE);
- gtk_widget_set_sensitive(lookup_widget(GTK_WIDGET(menu),"install1"),FALSE);
- gtk_widget_set_sensitive(lookup_widget(GTK_WIDGET(menu),"remove1"),FALSE);
- gtk_widget_set_sensitive(lookup_widget(GTK_WIDGET(menu),"unmark1"),FALSE);
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(gslapt_builder,"upgrade1")),FALSE);
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(gslapt_builder,"re-install1")),FALSE);
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(gslapt_builder,"downgrade1")),FALSE);
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(gslapt_builder,"install1")),FALSE);
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(gslapt_builder,"remove1")),FALSE);
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(gslapt_builder,"unmark1")),FALSE);
- g_signal_handlers_disconnect_by_func(GTK_OBJECT(lookup_widget(GTK_WIDGET(menu),"upgrade1")),add_pkg_for_install,GTK_OBJECT(gslapt));
- g_signal_handlers_disconnect_by_func(GTK_OBJECT(lookup_widget(GTK_WIDGET(menu),"re_install1")),add_pkg_for_reinstall,GTK_OBJECT(gslapt));
- g_signal_handlers_disconnect_by_func(GTK_OBJECT(lookup_widget(GTK_WIDGET(menu),"downgrade1")),add_pkg_for_reinstall,GTK_OBJECT(gslapt));
- g_signal_handlers_disconnect_by_func(GTK_OBJECT(lookup_widget(GTK_WIDGET(menu),"install1")),add_pkg_for_install,GTK_OBJECT(gslapt));
- g_signal_handlers_disconnect_by_func(GTK_OBJECT(lookup_widget(GTK_WIDGET(menu),"remove1")),add_pkg_for_removal,GTK_OBJECT(gslapt));
- g_signal_handlers_disconnect_by_func(GTK_OBJECT(lookup_widget(GTK_WIDGET(menu),"unmark1")),unmark_package,GTK_OBJECT(gslapt));
+ g_signal_handlers_disconnect_by_func(G_OBJECT(gtk_builder_get_object(gslapt_builder,"upgrade1")),add_pkg_for_install,G_OBJECT(gslapt));
+ g_signal_handlers_disconnect_by_func(G_OBJECT(gtk_builder_get_object(gslapt_builder,"re-install1")),add_pkg_for_reinstall,G_OBJECT(gslapt));
+ g_signal_handlers_disconnect_by_func(G_OBJECT(gtk_builder_get_object(gslapt_builder,"downgrade1")),add_pkg_for_reinstall,G_OBJECT(gslapt));
+ g_signal_handlers_disconnect_by_func(G_OBJECT(gtk_builder_get_object(gslapt_builder,"install1")),add_pkg_for_install,G_OBJECT(gslapt));
+ g_signal_handlers_disconnect_by_func(G_OBJECT(gtk_builder_get_object(gslapt_builder,"remove1")),add_pkg_for_removal,G_OBJECT(gslapt));
+ g_signal_handlers_disconnect_by_func(G_OBJECT(gtk_builder_get_object(gslapt_builder,"unmark1")),unmark_package,G_OBJECT(gslapt));
- g_signal_connect_swapped(G_OBJECT(lookup_widget(GTK_WIDGET(menu),"upgrade1")),
+ g_signal_connect_swapped(G_OBJECT(gtk_builder_get_object(gslapt_builder,"upgrade1")),
"activate", G_CALLBACK (add_pkg_for_install), GTK_WIDGET(gslapt));
- g_signal_connect_swapped((gpointer)lookup_widget(GTK_WIDGET(menu),"re_install1"),
- "activate", G_CALLBACK(add_pkg_for_reinstall),GTK_OBJECT(gslapt));
- g_signal_connect_swapped((gpointer)lookup_widget(GTK_WIDGET(menu),"downgrade1"),
- "activate", G_CALLBACK(add_pkg_for_reinstall),GTK_OBJECT(gslapt));
- g_signal_connect_swapped(G_OBJECT(lookup_widget(GTK_WIDGET(menu),"install1")),
+ g_signal_connect_swapped((gpointer)gtk_builder_get_object(gslapt_builder,"re-install1"),
+ "activate", G_CALLBACK(add_pkg_for_reinstall),G_OBJECT(gslapt));
+ g_signal_connect_swapped((gpointer)gtk_builder_get_object(gslapt_builder,"downgrade1"),
+ "activate", G_CALLBACK(add_pkg_for_reinstall),G_OBJECT(gslapt));
+ g_signal_connect_swapped(G_OBJECT(gtk_builder_get_object(gslapt_builder,"install1")),
"activate", G_CALLBACK (add_pkg_for_install), GTK_WIDGET(gslapt));
- g_signal_connect_swapped(G_OBJECT(lookup_widget(GTK_WIDGET(menu),"remove1")),
+ g_signal_connect_swapped(G_OBJECT(gtk_builder_get_object(gslapt_builder,"remove1")),
"activate",G_CALLBACK (add_pkg_for_removal), GTK_WIDGET(gslapt));
- g_signal_connect_swapped(G_OBJECT(lookup_widget(GTK_WIDGET(menu),"unmark1")),
+ g_signal_connect_swapped(G_OBJECT(gtk_builder_get_object(gslapt_builder,"unmark1")),
"activate",G_CALLBACK (unmark_package), GTK_WIDGET(gslapt));
if ( slapt_search_transaction(trans,pkg->name) == 0 ) {
if ( is_exclude == 0 ) {
/* upgrade */
if ( is_installed == 1 && is_newest == 0 && (slapt_search_transaction_by_pkg(trans,upgrade_pkg) == 0 ) ) {
- gtk_widget_set_sensitive(lookup_widget(GTK_WIDGET(menu),"upgrade1"),TRUE);
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(gslapt_builder,"upgrade1")),TRUE);
/* re-install */
}else if ( is_installed == 1 && is_newest == 1 && is_downloadable == 1 ) {
- gtk_widget_set_sensitive(lookup_widget(GTK_WIDGET(menu),"re_install1"),TRUE);
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(gslapt_builder,"re-install1")),TRUE);
/* this is for downgrades */
}else if ( is_installed == 0 && is_downgrade == 1 && is_downloadable == 1 ) {
- gtk_widget_set_sensitive(lookup_widget(GTK_WIDGET(menu),"downgrade1"),TRUE);
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(gslapt_builder,"downgrade1")),TRUE);
/* straight up install */
}else if ( is_installed == 0 && is_downloadable == 1 ) {
- gtk_widget_set_sensitive(lookup_widget(GTK_WIDGET(menu),"install1"),TRUE);
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(gslapt_builder,"install1")),TRUE);
}
}
@@ -3084,13 +3190,13 @@ static void build_package_action_menu (slapt_pkg_info_t *pkg)
is_installed == 1 && is_exclude != 1 &&
(slapt_search_transaction(trans,pkg->name) == 0)
) {
- gtk_widget_set_sensitive(lookup_widget(GTK_WIDGET(menu),"remove1"),TRUE);
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(gslapt_builder,"remove1")),TRUE);
}
if ((slapt_get_exact_pkg(trans->exclude_pkgs,pkg->name,pkg->version) == NULL) &&
(slapt_search_transaction_by_pkg(trans,pkg) == 1)
) {
- gtk_widget_set_sensitive(lookup_widget(GTK_WIDGET(menu),"unmark1"),TRUE);
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(gslapt_builder,"unmark1")),TRUE);
}
}
@@ -3102,7 +3208,7 @@ static void rebuild_package_action_menu (void)
GtkTreeIter iter;
GtkTreeModelSort *package_model;
- treeview = GTK_TREE_VIEW(lookup_widget(gslapt,"pkg_listing_treeview"));
+ treeview = GTK_TREE_VIEW(gtk_builder_get_object(gslapt_builder,"pkg_listing_treeview"));
package_model = GTK_TREE_MODEL_SORT(gtk_tree_view_get_model(treeview));
selection = gtk_tree_view_get_selection(treeview);
@@ -3142,12 +3248,12 @@ static void rebuild_package_action_menu (void)
}
} else {
- gtk_widget_set_sensitive(lookup_widget(GTK_WIDGET(gslapt),"upgrade1"),FALSE);
- gtk_widget_set_sensitive(lookup_widget(GTK_WIDGET(gslapt),"re_install1"),FALSE);
- gtk_widget_set_sensitive(lookup_widget(GTK_WIDGET(gslapt),"downgrade1"),FALSE);
- gtk_widget_set_sensitive(lookup_widget(GTK_WIDGET(gslapt),"install1"),FALSE);
- gtk_widget_set_sensitive(lookup_widget(GTK_WIDGET(gslapt),"remove1"),FALSE);
- gtk_widget_set_sensitive(lookup_widget(GTK_WIDGET(gslapt),"unmark1"),FALSE);
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(gslapt_builder,"upgrade1")),FALSE);
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(gslapt_builder,"re-install1")),FALSE);
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(gslapt_builder,"downgrade1")),FALSE);
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(gslapt_builder,"install1")),FALSE);
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(gslapt_builder,"remove1")),FALSE);
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(gslapt_builder,"unmark1")),FALSE);
}
}
@@ -3175,11 +3281,11 @@ static void reset_search_list (void)
view_list_available = FALSE, view_list_marked = FALSE,
view_list_upgradeable = FALSE;
- view_list_all = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(lookup_widget(gslapt,"view_all_packages_menu")));
- view_list_available = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(lookup_widget(gslapt,"view_available_packages_menu")));
- view_list_installed = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(lookup_widget(gslapt,"view_installed_packages_menu")));
- view_list_marked = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(lookup_widget(gslapt,"view_marked_packages_menu")));
- view_list_upgradeable = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(lookup_widget(gslapt,"view_upgradeable_packages_menu")));
+ view_list_all = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(gtk_builder_get_object(gslapt_builder,"view_all_packages_menu")));
+ view_list_available = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(gtk_builder_get_object(gslapt_builder,"view_available_packages_menu")));
+ view_list_installed = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(gtk_builder_get_object(gslapt_builder,"view_installed_packages_menu")));
+ view_list_marked = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(gtk_builder_get_object(gslapt_builder,"view_marked_packages_menu")));
+ view_list_upgradeable = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(gtk_builder_get_object(gslapt_builder,"view_upgradeable_packages_menu")));
if (view_list_all) {
view_all_packages(NULL,NULL);
@@ -3214,7 +3320,7 @@ void repositories_changed_callback (GtkWidget *repositories_changed,
gpointer *user_data)
{
gtk_widget_destroy(GTK_WIDGET(repositories_changed));
- g_signal_emit_by_name(lookup_widget(gslapt,"action_bar_update_button"),
+ g_signal_emit_by_name(gtk_builder_get_object(gslapt_builder,"action_bar_update_button"),
"clicked");
}
@@ -3277,13 +3383,16 @@ static gboolean toggle_source_status (GtkTreeView *treeview, gpointer data)
GtkTreeModel *model;
GtkTreeIter iter;
+ if (event == NULL)
+ return FALSE;
+
if (event->type != GDK_BUTTON_PRESS)
return FALSE;
if (!gtk_tree_view_get_path_at_pos(treeview,event->x,event->y,&path,&column,NULL,NULL))
return FALSE;
- if (strcmp(column->title,(gchar *)_("Enabled")) != 0)
+ if (strcmp(gtk_tree_view_column_get_title(column),(gchar *)_("Enabled")) != 0)
return FALSE;
gtk_tree_path_free(path);
@@ -3295,14 +3404,14 @@ static gboolean toggle_source_status (GtkTreeView *treeview, gpointer data)
gtk_tree_model_get(model,&iter,1,&source,2,&status,-1 );
if (status) { /* is active */
- GdkPixbuf *status_icon = create_pixbuf("pkg_action_available.png");
+ GdkPixbuf *status_icon = gslapt_img("pkg_action_available.png");
gtk_list_store_set(GTK_LIST_STORE(model),&iter,
0,status_icon,
2,FALSE,
-1);
g_object_unref(status_icon);
} else { /* is not active */
- GdkPixbuf *status_icon = create_pixbuf("pkg_action_installed.png");
+ GdkPixbuf *status_icon = gslapt_img("pkg_action_installed.png");
gtk_list_store_set(GTK_LIST_STORE(model),&iter,
0,status_icon,
2,TRUE,
@@ -3319,23 +3428,29 @@ static gboolean toggle_source_status (GtkTreeView *treeview, gpointer data)
static void display_dep_error_dialog (slapt_pkg_info_t *pkg,guint m, guint c)
{
- GtkWidget *w = create_dep_error_dialog();
+ GtkBuilder *builder;
+ GtkWidget *w;
GtkTextBuffer *error_buf = NULL;
guint i;
gchar *msg = g_strdup_printf((gchar *)_("<b>Excluding %s due to dependency failure</b>"),pkg->name);
+ builder = gtk_builder_new ();
+ gslapt_load_ui (builder, "dep_error_dialog.ui");
+ w = GTK_WIDGET (gtk_builder_get_object (builder, "dep_error_dialog"));
+ gtk_builder_connect_signals (builder, NULL);
+
gtk_window_set_title (GTK_WINDOW(w),(char *)_("Error"));
- gtk_label_set_text(GTK_LABEL(lookup_widget(w,"dep_error_label")),msg);
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(builder,"dep_error_label")),msg);
g_free(msg);
- gtk_label_set_text(GTK_LABEL(lookup_widget(w,"dep_error_install_anyway_warning_label")),
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(builder,"dep_error_install_anyway_warning_label")),
(char *)_("Missing dependencies may mean the software in this package will not function correctly. Do you want to continue without the required packages?"));
- gtk_label_set_use_markup (GTK_LABEL(lookup_widget(w,"dep_error_label")),
+ gtk_label_set_use_markup (GTK_LABEL(gtk_builder_get_object(builder,"dep_error_label")),
TRUE);
- gtk_label_set_use_markup (GTK_LABEL(lookup_widget(w,"dep_error_install_anyway_warning_label")),
+ gtk_label_set_use_markup (GTK_LABEL(gtk_builder_get_object(builder,"dep_error_install_anyway_warning_label")),
TRUE);
- error_buf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(lookup_widget(w,"dep_error_text")));
+ error_buf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(gtk_builder_get_object(builder,"dep_error_text")));
if (m == trans->missing_err->err_count)
m = 0;
@@ -3367,17 +3482,27 @@ static void display_dep_error_dialog (slapt_pkg_info_t *pkg,guint m, guint c)
free(err);
}
- g_signal_connect(G_OBJECT(lookup_widget(w,"dep_error_cancel_button")),"clicked",
+ g_signal_connect(G_OBJECT(gtk_builder_get_object(builder,"dep_error_cancel_button")),"clicked",
G_CALLBACK(exclude_dep_error_callback),pkg);
- g_signal_connect(G_OBJECT(lookup_widget(w,"dep_error_install_button")),"clicked",
+ g_signal_connect(G_OBJECT(gtk_builder_get_object(builder,"dep_error_install_button")),"clicked",
G_CALLBACK(install_dep_error_callback),pkg);
- gtk_widget_show(w);
+ g_object_unref (G_OBJECT (builder));
+ gtk_widget_show_all(w);
}
-static void exclude_dep_error_callback (GtkObject *object, gpointer *user_data)
+static void exclude_dep_error_callback (GObject *object, gpointer *user_data)
{
- GtkWidget *dep_error_dialog = lookup_widget(GTK_WIDGET(object),"dep_error_dialog");
+ GtkBuilder *builder = gtk_builder_new ();
+ GtkWidget *dep_error_dialog;
+
+ gslapt_load_ui (builder, "dep_error_dialog.ui");
+
+ dep_error_dialog = GTK_WIDGET(gtk_builder_get_object(builder, "dep_error_dialog"));
+
+ gtk_builder_connect_signals (builder, NULL);
+ g_object_unref (G_OBJECT (builder));
+
slapt_pkg_info_t *pkg = (slapt_pkg_info_t *)user_data;
slapt_add_exclude_to_transaction(trans,pkg);
@@ -3385,18 +3510,28 @@ static void exclude_dep_error_callback (GtkObject *object, gpointer *user_data)
gtk_widget_destroy(dep_error_dialog);
}
-static void install_dep_error_callback (GtkObject *object, gpointer *user_data)
+static void install_dep_error_callback (GObject *object, gpointer *user_data)
{
+ GtkBuilder *builder = gtk_builder_new ();
GtkTreeView *treeview;
GtkTreeIter iter;
GtkTreeModel *model;
GtkTreeModelFilter *filter_model;
GtkTreeModelSort *package_model;
- GtkWidget *dep_error_dialog = lookup_widget(GTK_WIDGET(object),"dep_error_dialog");
- slapt_pkg_info_t *pkg = (slapt_pkg_info_t *)user_data;
- slapt_pkg_info_t *installed_pkg = slapt_get_newest_pkg(installed,pkg->name);
+ GtkWidget *dep_error_dialog;
+ slapt_pkg_info_t *pkg;
+ slapt_pkg_info_t *installed_pkg;
+
+ gslapt_load_ui (builder, "dep_error_dialog.ui");
+
+ dep_error_dialog = GTK_WIDGET(gtk_builder_get_object(builder,"dep_error_dialog"));
+ gtk_builder_connect_signals (builder, NULL);
+ g_object_unref (G_OBJECT (builder));
- treeview = GTK_TREE_VIEW(lookup_widget(gslapt,"pkg_listing_treeview"));
+ pkg = (slapt_pkg_info_t *)user_data;
+ installed_pkg = slapt_get_newest_pkg(installed,pkg->name);
+
+ treeview = GTK_TREE_VIEW(gtk_builder_get_object(gslapt_builder,"pkg_listing_treeview"));
package_model = GTK_TREE_MODEL_SORT(gtk_tree_view_get_model(treeview));
filter_model = GTK_TREE_MODEL_FILTER(gtk_tree_model_sort_get_model(GTK_TREE_MODEL_SORT(package_model)));
model = GTK_TREE_MODEL(gtk_tree_model_filter_get_model(GTK_TREE_MODEL_FILTER(filter_model)));
@@ -3433,8 +3568,8 @@ static void install_dep_error_callback (GtkObject *object, gpointer *user_data)
void view_all_packages (GtkMenuItem *menuitem, gpointer *user_data)
{
- gchar *pattern = (gchar *)gtk_entry_get_text(GTK_ENTRY(lookup_widget(gslapt,"search_entry")));
- GtkTreeView *treeview = GTK_TREE_VIEW(lookup_widget(gslapt,"pkg_listing_treeview"));
+ gchar *pattern = (gchar *)gtk_entry_get_text(GTK_ENTRY(gtk_builder_get_object(gslapt_builder,"search_entry")));
+ GtkTreeView *treeview = GTK_TREE_VIEW(gtk_builder_get_object(gslapt_builder,"pkg_listing_treeview"));
GtkTreeModelFilter *filter_model;
GtkTreeModel *base_model;
GtkTreeIter iter;
@@ -3444,7 +3579,7 @@ void view_all_packages (GtkMenuItem *menuitem, gpointer *user_data)
if (pattern && strlen(pattern) > 0)
return build_searched_treeviewlist(GTK_WIDGET(treeview), pattern);
- treeview = GTK_TREE_VIEW(lookup_widget(gslapt,"pkg_listing_treeview"));
+ treeview = GTK_TREE_VIEW(gtk_builder_get_object(gslapt_builder,"pkg_listing_treeview"));
package_model = GTK_TREE_MODEL_SORT(gtk_tree_view_get_model(treeview));
filter_model = GTK_TREE_MODEL_FILTER(gtk_tree_model_sort_get_model(GTK_TREE_MODEL_SORT(package_model)));
@@ -3461,8 +3596,8 @@ void view_all_packages (GtkMenuItem *menuitem, gpointer *user_data)
void view_available_packages (GtkMenuItem *menuitem, gpointer *user_data)
{
gboolean show_installed = FALSE, show_available = TRUE;
- gchar *pattern = (gchar *)gtk_entry_get_text(GTK_ENTRY(lookup_widget(gslapt,"search_entry")));
- GtkTreeView *treeview = GTK_TREE_VIEW(lookup_widget(gslapt,"pkg_listing_treeview"));
+ gchar *pattern = (gchar *)gtk_entry_get_text(GTK_ENTRY(gtk_builder_get_object(gslapt_builder,"search_entry")));
+ GtkTreeView *treeview = GTK_TREE_VIEW(gtk_builder_get_object(gslapt_builder,"pkg_listing_treeview"));
view_installed_or_available_packages(show_installed, show_available);
@@ -3473,8 +3608,8 @@ void view_available_packages (GtkMenuItem *menuitem, gpointer *user_data)
void view_installed_packages (GtkMenuItem *menuitem, gpointer *user_data)
{
gboolean show_installed = TRUE, show_available = FALSE;
- gchar *pattern = (gchar *)gtk_entry_get_text(GTK_ENTRY(lookup_widget(gslapt,"search_entry")));
- GtkTreeView *treeview = GTK_TREE_VIEW(lookup_widget(gslapt,"pkg_listing_treeview"));
+ gchar *pattern = (gchar *)gtk_entry_get_text(GTK_ENTRY(gtk_builder_get_object(gslapt_builder,"search_entry")));
+ GtkTreeView *treeview = GTK_TREE_VIEW(gtk_builder_get_object(gslapt_builder,"pkg_listing_treeview"));
view_installed_or_available_packages(show_installed, show_available);
@@ -3491,7 +3626,7 @@ void view_installed_or_available_packages (gboolean show_installed, gboolean sho
GtkTreeModelSort *package_model;
GtkTreeView *treeview;
- treeview = GTK_TREE_VIEW(lookup_widget(gslapt,"pkg_listing_treeview"));
+ treeview = GTK_TREE_VIEW(gtk_builder_get_object(gslapt_builder,"pkg_listing_treeview"));
package_model = GTK_TREE_MODEL_SORT(gtk_tree_view_get_model(GTK_TREE_VIEW(treeview)));
filter_model = GTK_TREE_MODEL_FILTER(gtk_tree_model_sort_get_model(GTK_TREE_MODEL_SORT(package_model)));
@@ -3528,9 +3663,9 @@ void view_marked_packages (GtkMenuItem *menuitem, gpointer *user_data)
GtkTreeModel *base_model;
GtkTreeModelSort *package_model;
GtkTreeView *treeview;
- gchar *pattern = (gchar *)gtk_entry_get_text(GTK_ENTRY(lookup_widget(gslapt,"search_entry")));
+ gchar *pattern = (gchar *)gtk_entry_get_text(GTK_ENTRY(gtk_builder_get_object(gslapt_builder,"search_entry")));
- treeview = GTK_TREE_VIEW(lookup_widget(gslapt,"pkg_listing_treeview"));
+ treeview = GTK_TREE_VIEW(gtk_builder_get_object(gslapt_builder,"pkg_listing_treeview"));
package_model = GTK_TREE_MODEL_SORT(gtk_tree_view_get_model(GTK_TREE_VIEW(treeview)));
filter_model = GTK_TREE_MODEL_FILTER(gtk_tree_model_sort_get_model(GTK_TREE_MODEL_SORT(package_model)));
@@ -3562,7 +3697,7 @@ static int set_iter_for_install(GtkTreeModel *model, GtkTreeIter *iter,
slapt_pkg_info_t *pkg)
{
gchar *status = g_strdup_printf("i%s",pkg->name);
- GdkPixbuf *status_icon = create_pixbuf("pkg_action_install.png");
+ GdkPixbuf *status_icon = gslapt_img("pkg_action_install.png");
gtk_list_store_set(GTK_LIST_STORE(model),iter,STATUS_ICON_COLUMN,status_icon,-1);
gtk_list_store_set(GTK_LIST_STORE(model),iter,STATUS_COLUMN,status,-1);
gtk_list_store_set(GTK_LIST_STORE(model),iter,MARKED_COLUMN,TRUE,-1);
@@ -3575,7 +3710,7 @@ static int set_iter_for_reinstall(GtkTreeModel *model, GtkTreeIter *iter,
slapt_pkg_info_t *pkg)
{
gchar *status = g_strdup_printf("u%s",pkg->name);
- GdkPixbuf *status_icon = create_pixbuf("pkg_action_reinstall.png");
+ GdkPixbuf *status_icon = gslapt_img("pkg_action_reinstall.png");
gtk_list_store_set(GTK_LIST_STORE(model),iter,STATUS_ICON_COLUMN,status_icon,-1);
gtk_list_store_set(GTK_LIST_STORE(model),iter,STATUS_COLUMN,status,-1);
gtk_list_store_set(GTK_LIST_STORE(model),iter,MARKED_COLUMN,TRUE,-1);
@@ -3588,7 +3723,7 @@ static int set_iter_for_downgrade(GtkTreeModel *model, GtkTreeIter *iter,
slapt_pkg_info_t *pkg)
{
gchar *status = g_strdup_printf("u%s",pkg->name);
- GdkPixbuf *status_icon = create_pixbuf("pkg_action_downgrade.png");
+ GdkPixbuf *status_icon = gslapt_img("pkg_action_downgrade.png");
gtk_list_store_set(GTK_LIST_STORE(model),iter,STATUS_ICON_COLUMN,status_icon,-1);
gtk_list_store_set(GTK_LIST_STORE(model),iter,STATUS_COLUMN,status,-1);
gtk_list_store_set(GTK_LIST_STORE(model),iter,MARKED_COLUMN,TRUE,-1);
@@ -3601,7 +3736,7 @@ static int set_iter_for_upgrade(GtkTreeModel *model, GtkTreeIter *iter,
slapt_pkg_info_t *pkg)
{
gchar *status = g_strdup_printf("u%s",pkg->name);
- GdkPixbuf *status_icon = create_pixbuf("pkg_action_upgrade.png");
+ GdkPixbuf *status_icon = gslapt_img("pkg_action_upgrade.png");
gtk_list_store_set(GTK_LIST_STORE(model),iter,STATUS_ICON_COLUMN,status_icon,-1);
gtk_list_store_set(GTK_LIST_STORE(model),iter,STATUS_COLUMN,status,-1);
gtk_list_store_set(GTK_LIST_STORE(model),iter,MARKED_COLUMN,TRUE,-1);
@@ -3614,7 +3749,7 @@ static int set_iter_for_remove(GtkTreeModel *model, GtkTreeIter *iter,
slapt_pkg_info_t *pkg)
{
gchar *status = g_strdup_printf("r%s",pkg->name);
- GdkPixbuf *status_icon = create_pixbuf("pkg_action_remove.png");
+ GdkPixbuf *status_icon = gslapt_img("pkg_action_remove.png");
gtk_list_store_set(GTK_LIST_STORE(model),iter,STATUS_ICON_COLUMN,status_icon,-1);
gtk_list_store_set(GTK_LIST_STORE(model),iter,STATUS_COLUMN,status,-1);
gtk_list_store_set(GTK_LIST_STORE(model),iter,MARKED_COLUMN,TRUE,-1);
@@ -3638,7 +3773,7 @@ void mark_obsolete_packages (GtkMenuItem *menuitem, gpointer *user_data)
global_config, all, installed);
guint i;
- treeview = GTK_TREE_VIEW(lookup_widget(gslapt,"pkg_listing_treeview"));
+ treeview = GTK_TREE_VIEW(gtk_builder_get_object(gslapt_builder,"pkg_listing_treeview"));
package_model = GTK_TREE_MODEL_SORT(gtk_tree_view_get_model(treeview));
filter_model = GTK_TREE_MODEL_FILTER(gtk_tree_model_sort_get_model(GTK_TREE_MODEL_SORT(package_model)));
@@ -3715,15 +3850,16 @@ static void build_verification_sources_treeviewlist (GtkWidget *treeview)
}
#ifdef SLAPT_HAS_GPGME
-static void get_gpg_key(GtkWidget *w)
+static void get_gpg_key(GtkBuilder *b)
{
GtkTreeIter iter;
GtkTreeModel *model;
- GtkTreeView *source_tree = GTK_TREE_VIEW(lookup_widget(w,"preferences_verification_sources_treeview"));
+ GtkTreeView *source_tree = GTK_TREE_VIEW(gtk_builder_get_object(b,"preferences_verification_sources_treeview"));
GtkTreeSelection *select = gtk_tree_view_get_selection (GTK_TREE_VIEW (source_tree));
GtkListStore *store = GTK_LIST_STORE(gtk_tree_view_get_model(source_tree));
if ( gtk_tree_selection_get_selected(select,&model,&iter)) {
+ GtkBuilder *builder;
GtkLabel *progress_action_label, *progress_message_label;
GtkProgressBar *p_bar, *dl_bar;
unsigned int compressed = 0;
@@ -3732,18 +3868,22 @@ static void get_gpg_key(GtkWidget *w)
gchar *url;
gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, 0, &url, -1);
- progress_window = create_dl_progress_window();
+ builder = gtk_builder_new ();
+ gslapt_load_ui (builder, "dl_progress_window.ui");
+ progress_window = GTK_WIDGET (gtk_builder_get_object (builder, "dl_progress_window"));
+ gtk_builder_connect_signals (builder, NULL);
+
gtk_window_set_title(GTK_WINDOW(progress_window),(gchar *)_("Progress"));
- p_bar = GTK_PROGRESS_BAR(lookup_widget(progress_window,"progress_progressbar"));
- dl_bar = GTK_PROGRESS_BAR(lookup_widget(progress_window,"dl_progress"));
- progress_action_label = GTK_LABEL(lookup_widget(progress_window,"progress_action"));
- progress_message_label = GTK_LABEL(lookup_widget(progress_window,"progress_message"));
+ p_bar = GTK_PROGRESS_BAR(gtk_builder_get_object(builder,"dl_progress_progressbar"));
+ dl_bar = GTK_PROGRESS_BAR(gtk_builder_get_object(builder,"dl_progress"));
+ progress_action_label = GTK_LABEL(gtk_builder_get_object(builder,"dl_progress_action"));
+ progress_message_label = GTK_LABEL(gtk_builder_get_object(builder,"dl_progress_message"));
gtk_progress_bar_set_fraction(dl_bar,0.0);
gtk_label_set_text(progress_message_label,url);
gtk_label_set_text(progress_action_label,(gchar *)SLAPT_GPG_KEY);
gdk_threads_enter();
- gtk_widget_show(progress_window);
+ gtk_widget_show_all(progress_window);
gdk_threads_leave();
gpg_key = slapt_get_pkg_source_gpg_key(global_config, url, &compressed);
@@ -3774,6 +3914,7 @@ static void get_gpg_key(GtkWidget *w)
g_free(url);
gdk_threads_enter();
+ g_object_unref (G_OBJECT (builder));
gtk_widget_destroy(progress_window);
gdk_threads_leave();
@@ -3786,9 +3927,9 @@ void preferences_sources_add_key (GtkWidget *w, gpointer *user_data)
GThread *gdp;
#if !GLIB_CHECK_VERSION (2, 31, 0)
- gdp = g_thread_create((GThreadFunc)get_gpg_key,w,FALSE,NULL);
+ gdp = g_thread_create((GThreadFunc)get_gpg_key,GTK_BUILDER(user_data),FALSE,NULL);
#else
- gdp = g_thread_new("GslaptPrefAddSource", (GThreadFunc)get_gpg_key,w);
+ gdp = g_thread_new("GslaptPrefAddSource", (GThreadFunc)get_gpg_key,GTK_BUILDER(user_data));
#endif
return;
@@ -3803,9 +3944,9 @@ void view_upgradeable_packages (GtkMenuItem *menuitem, gpointer *user_data)
GtkTreeModel *base_model;
GtkTreeModelSort *package_model;
GtkTreeView *treeview;
- gchar *pattern = (gchar *)gtk_entry_get_text(GTK_ENTRY(lookup_widget(gslapt,"search_entry")));
+ gchar *pattern = (gchar *)gtk_entry_get_text(GTK_ENTRY(gtk_builder_get_object(gslapt_builder,"search_entry")));
- treeview = GTK_TREE_VIEW(lookup_widget(gslapt,"pkg_listing_treeview"));
+ treeview = GTK_TREE_VIEW(gtk_builder_get_object(gslapt_builder,"pkg_listing_treeview"));
package_model = GTK_TREE_MODEL_SORT(gtk_tree_view_get_model(GTK_TREE_VIEW(treeview)));
filter_model = GTK_TREE_MODEL_FILTER(gtk_tree_model_sort_get_model(GTK_TREE_MODEL_SORT(package_model)));
@@ -3835,9 +3976,18 @@ void view_upgradeable_packages (GtkMenuItem *menuitem, gpointer *user_data)
void view_changelogs (GtkMenuItem *menuitem, gpointer *user_data)
{
+ GtkBuilder *builder = gtk_builder_new ();
int i, changelogs = 0;
- GtkWidget *changelog_window = create_changelog_window();
- GtkWidget *changelog_notebook = lookup_widget(changelog_window, "changelog_notebook");
+ GtkWidget *changelog_window;
+ GtkWidget *changelog_notebook;
+
+ gslapt_load_ui (builder, "changelog_window.ui");
+ changelog_window = GTK_WIDGET (gtk_builder_get_object (builder, "changelog_window"));
+ gtk_builder_connect_signals (builder, NULL);
+
+ changelog_notebook = GTK_WIDGET(gtk_builder_get_object(builder, "changelog_notebook"));
+
+ g_object_unref (G_OBJECT (builder));
if ((gslapt_settings->cl_x == gslapt_settings->cl_y == gslapt_settings->cl_width == gslapt_settings->cl_height == 0)) {
gtk_window_set_default_size(GTK_WINDOW(changelog_window),
@@ -3929,9 +4079,9 @@ void view_changelogs (GtkMenuItem *menuitem, gpointer *user_data)
gtk_text_buffer_set_text(changelog_buffer, changelog_txt, -1);
gtk_text_view_set_editable (GTK_TEXT_VIEW (textview), FALSE);
- gtk_widget_show( scrolledwindow );
- gtk_widget_show( textview );
- gtk_widget_show( label );
+ gtk_widget_show_all( scrolledwindow );
+ gtk_widget_show_all( textview );
+ gtk_widget_show_all( label );
gtk_container_add ( GTK_CONTAINER(changelog_notebook), scrolledwindow );
gtk_container_set_border_width ( GTK_CONTAINER(scrolledwindow), 2 );
@@ -3946,7 +4096,7 @@ void view_changelogs (GtkMenuItem *menuitem, gpointer *user_data)
}
if (changelogs > 0) {
- gtk_widget_show(changelog_window);
+ gtk_widget_show_all(changelog_window);
} else {
gtk_widget_destroy(changelog_window);
notify((gchar *)_("ChangeLogs"),_("No changelogs found."));
@@ -3955,7 +4105,8 @@ void view_changelogs (GtkMenuItem *menuitem, gpointer *user_data)
void cancel_source_edit (GtkWidget *w, gpointer *user_data)
{
- gtk_widget_destroy(w);
+ gtk_widget_destroy(GTK_WIDGET(gtk_builder_get_object(GTK_BUILDER(user_data),"source_window")));
+ g_object_unref(G_OBJECT(user_data));
}
void source_edit_ok (GtkWidget *w, gpointer *user_data)
@@ -3963,11 +4114,11 @@ void source_edit_ok (GtkWidget *w, gpointer *user_data)
SLAPT_PRIORITY_T priority;
const char *original_url = NULL;
const gchar *source = NULL;
- GtkEntry *source_entry = GTK_ENTRY(lookup_widget(w,"source_entry"));
- GtkComboBox *source_priority = GTK_COMBO_BOX(lookup_widget(w,"source_priority"));
+ GtkEntry *source_entry = GTK_ENTRY(gtk_builder_get_object(GTK_BUILDER(user_data),"source_entry"));
+ GtkComboBox *source_priority = GTK_COMBO_BOX(gtk_builder_get_object(GTK_BUILDER(user_data),"source_priority"));
GtkTreeIter iter;
GtkTreeModel *model;
- GtkTreeView *source_tree = GTK_TREE_VIEW(lookup_widget(preferences_window,"preferences_sources_treeview"));
+ GtkTreeView *source_tree = GTK_TREE_VIEW(gtk_builder_get_object(preferences_window_builder,"preferences_sources_treeview"));
GtkTreeSelection *select = gtk_tree_view_get_selection (GTK_TREE_VIEW (source_tree));
GtkListStore *store = GTK_LIST_STORE(gtk_tree_view_get_model(source_tree));
@@ -3978,7 +4129,7 @@ void source_edit_ok (GtkWidget *w, gpointer *user_data)
priority = convert_gslapt_priority_to_slapt_priority(gtk_combo_box_get_active(source_priority));
- if ((original_url = g_object_get_data( G_OBJECT(w), "original_url")) != NULL) {
+ if ((original_url = g_object_get_data( G_OBJECT(gtk_builder_get_object(GTK_BUILDER(user_data),"source_window")), "original_url")) != NULL) {
const char *priority_str = slapt_priority_to_str(priority);
if ( gtk_tree_selection_get_selected(select,&model,&iter))
@@ -3986,7 +4137,7 @@ void source_edit_ok (GtkWidget *w, gpointer *user_data)
} else {
const char *priority_str = slapt_priority_to_str(priority);
- GdkPixbuf *status_icon = create_pixbuf("pkg_action_installed.png");
+ GdkPixbuf *status_icon = gslapt_img("pkg_action_installed.png");
gtk_list_store_append(store, &iter);
gtk_list_store_set(store, &iter,
0, status_icon,
@@ -3999,7 +4150,8 @@ void source_edit_ok (GtkWidget *w, gpointer *user_data)
}
sources_modified = TRUE;
- gtk_widget_destroy(w);
+ gtk_widget_destroy(GTK_WIDGET(gtk_builder_get_object(GTK_BUILDER(user_data),"source_window")));
+ g_object_unref(G_OBJECT(user_data));
}
static SLAPT_PRIORITY_T convert_gslapt_priority_to_slapt_priority(gint p)
@@ -4033,3 +4185,25 @@ static gint convert_slapt_priority_to_gslapt_priority(SLAPT_PRIORITY_T p)
};
}
+GdkPixbuf *gslapt_img (const char *img)
+{
+ char buffer[2048];
+
+ snprintf(buffer, 2047, "%s/%s/ui/%s", PACKAGE_DATA_DIR, PACKAGE, img);
+
+ GdkPixbuf *i = gdk_pixbuf_new_from_file(buffer, NULL);
+ return i;
+}
+
+void gslapt_load_ui (GtkBuilder *b, const char *f)
+{
+ GError *error = NULL;
+ char buffer[2048];
+ snprintf (buffer, 2047, "%s/%s/ui/%s", PACKAGE_DATA_DIR, PACKAGE, f);
+
+ if (!gtk_builder_add_from_file (b, buffer, &error)) {
+ g_warning ("Couldn't load builder file: %s", error->message);
+ g_error_free (error);
+ exit(1);
+ }
+}
diff --git a/src/callbacks.h b/src/callbacks.h
index f75e337..8844345 100644
--- a/src/callbacks.h
+++ b/src/callbacks.h
@@ -37,10 +37,10 @@ enum {
};
gboolean gslapt_window_resized(GtkWindow *window, GdkEvent *event, gpointer data);
-void on_gslapt_destroy (GtkObject *object, gpointer *user_data);
-void update_callback (GtkObject *object, gpointer *user_data);
-void upgrade_callback (GtkObject *object, gpointer *user_data);
-void execute_callback (GtkObject *object, gpointer *user_data);
+void on_gslapt_destroy (GObject *object, gpointer *user_data);
+void update_callback (GObject *object, gpointer *user_data);
+void upgrade_callback (GObject *object, gpointer *user_data);
+void execute_callback (GObject *object, gpointer *user_data);
void search_activated (GtkWidget *gslapt, gpointer *user_data);
void add_pkg_for_install (GtkWidget *gslapt, gpointer *user_data);
void add_pkg_for_reinstall (GtkWidget *gslapt, gpointer *user_data);
@@ -48,7 +48,7 @@ void add_pkg_for_removal (GtkWidget *gslapt, gpointer *user_data);
void build_installed_treeviewlist (GtkWidget *);
void build_available_treeviewlist (GtkWidget *);
void build_searched_treeviewlist (GtkWidget *,gchar *pattern);
-void open_about (GtkObject *object, gpointer *user_data);
+void open_about (GObject *object, gpointer *user_data);
void show_pkg_details (GtkTreeSelection *selection, gpointer data);
@@ -85,7 +85,7 @@ void repositories_changed_callback (GtkWidget *repositories_changed,
/* menu callbacks */
void clean_callback (GtkWidget *widget, gpointer *user_data);
void open_preferences (GtkMenuItem *menuitem, gpointer *user_data);
-void open_icon_legend (GtkObject *object, gpointer *user_data);
+void open_icon_legend (GObject *object, gpointer *user_data);
void unmark_all_activate (GtkMenuItem *menuitem, gpointer *user_data);
void update_activate (GtkMenuItem *menuitem, gpointer *user_data);
void mark_all_upgrades_activate (GtkMenuItem *menuitem, gpointer *user_data);
@@ -112,3 +112,6 @@ void view_changelogs (GtkMenuItem *menuitem, gpointer *user_data);
void cancel_source_edit (GtkWidget *w, gpointer *user_data);
void source_edit_ok (GtkWidget *w, gpointer *user_data);
+
+GdkPixbuf *gslapt_img (const char *img);
+void gslapt_load_ui (GtkBuilder *b, const char *f);
diff --git a/src/interface.c b/src/interface.c
index e0e4a93..3ff54fe 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -2064,7 +2064,7 @@ create_about (void)
gtk_label_set_justify (GTK_LABEL (label149), GTK_JUSTIFY_CENTER);
gtk_label_set_selectable (GTK_LABEL (label149), TRUE);
- dialog_action_area1 = GTK_DIALOG (about)->action_area;
+ dialog_action_area1 = gtk_dialog_get_action_area (about);
gtk_widget_set_name (dialog_action_area1, "dialog_action_area1");
gtk_widget_show (dialog_action_area1);
gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);
@@ -2141,7 +2141,7 @@ create_notification (void)
gtk_box_pack_start (GTK_BOX (hbox112), notification_label, TRUE, TRUE, 6);
gtk_label_set_use_markup (GTK_LABEL (notification_label), TRUE);
- dialog_action_area3 = GTK_DIALOG (notification)->action_area;
+ dialog_action_area3 = gtk_dialog_get_action_area (notification);
gtk_widget_set_name (dialog_action_area3, "dialog_action_area3");
gtk_widget_show (dialog_action_area3);
gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area3), GTK_BUTTONBOX_END);
@@ -2402,7 +2402,7 @@ create_icon_legend (void)
gtk_widget_show (label259);
gtk_box_pack_start (GTK_BOX (hbox104), label259, FALSE, TRUE, 6);
- dialog_action_area4 = GTK_DIALOG (icon_legend)->action_area;
+ dialog_action_area4 = gtk_dialog_get_action_area (icon_legend);
gtk_widget_set_name (dialog_action_area4, "dialog_action_area4");
gtk_widget_show (dialog_action_area4);
gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area4), GTK_BUTTONBOX_END);
@@ -2592,7 +2592,7 @@ create_repositories_changed (void)
gtk_label_set_line_wrap (GTK_LABEL (label288), TRUE);
gtk_misc_set_alignment (GTK_MISC (label288), 0, 0);
- dialog_action_area5 = GTK_DIALOG (repositories_changed)->action_area;
+ dialog_action_area5 = gtk_dialog_get_action_area (repositories_changed);
gtk_widget_set_name (dialog_action_area5, "dialog_action_area5");
gtk_widget_show (dialog_action_area5);
gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area5), GTK_BUTTONBOX_END);
@@ -2732,7 +2732,7 @@ create_dep_error_dialog (void)
gtk_box_pack_start (GTK_BOX (vbox72), label284, FALSE, FALSE, 0);
gtk_misc_set_alignment (GTK_MISC (label284), 0, 0);
- dialog_action_area6 = GTK_DIALOG (dep_error_dialog)->action_area;
+ dialog_action_area6 = gtk_dialog_get_action_area (dep_error_dialog);
gtk_widget_set_name (dialog_action_area6, "dialog_action_area6");
gtk_widget_show (dialog_action_area6);
gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area6), GTK_BUTTONBOX_END);
@@ -2834,7 +2834,7 @@ create_source_failed_dialog (void)
gtk_label_set_line_wrap (GTK_LABEL (label290), TRUE);
gtk_misc_set_alignment (GTK_MISC (label290), 0, 0);
- dialog_action_area7 = GTK_DIALOG (source_failed_dialog)->action_area;
+ dialog_action_area7 = gtk_dialog_get_action_area (source_failed_dialog);
gtk_widget_set_name (dialog_action_area7, "dialog_action_area7");
gtk_widget_show (dialog_action_area7);
gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area7), GTK_BUTTONBOX_END);
diff --git a/src/main.c b/src/main.c
index 9a942ff..e492cb1 100644
--- a/src/main.c
+++ b/src/main.c
@@ -31,6 +31,7 @@ slapt_rc_config *global_config; /* our config struct */
slapt_pkg_list_t *installed;
slapt_pkg_list_t *all;
GtkWidget *gslapt;
+GtkBuilder *gslapt_builder;
slapt_transaction_t *trans = NULL;
char rc_location[1024];
GslaptSettings *gslapt_settings = NULL;
@@ -71,8 +72,6 @@ int main (int argc, char *argv[]) {
gslapt_series_map = gslapt_series_map_init();
gslapt_series_map_fill(gslapt_series_map);
- add_pixmap_directory (PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps");
-
for (option_index = 1; option_index < argc; ++option_index) {
if (strcmp(argv[option_index],"--upgrade") == 0) {
@@ -165,28 +164,34 @@ int main (int argc, char *argv[]) {
installed = slapt_get_installed_pkgs();
all = slapt_get_available_pkgs();
- gslapt = (GtkWidget *)create_gslapt();
+ gslapt_builder = gtk_builder_new ();
+ gtk_builder_set_translation_domain (gslapt_builder, GETTEXT_PACKAGE);
+ gslapt_load_ui (gslapt_builder, "gslapt.ui");
+
+ gslapt = GTK_WIDGET (gtk_builder_get_object (gslapt_builder, "gslapt"));
+ gtk_builder_connect_signals (gslapt_builder, NULL);
+ // g_object_unref (G_OBJECT (gslapt_builder));
completions = build_search_completions();
- gtk_entry_set_completion(GTK_ENTRY(lookup_widget(gslapt,"search_entry")),completions);
+ gtk_entry_set_completion(GTK_ENTRY(gtk_builder_get_object (gslapt_builder,"search_entry")),completions);
build_treeview_columns(
- (GtkWidget *)lookup_widget(gslapt,"pkg_listing_treeview"));
+ GTK_WIDGET(gtk_builder_get_object (gslapt_builder,"pkg_listing_treeview")));
/*
this sometimes screws up resizing of the window (why?)
g_thread_create((GThreadFunc)build_package_treeviewlist,
- (GtkWidget *)lookup_widget(gslapt,"pkg_listing_treeview"),FALSE,NULL);
+ GTK_WIDGET(gtk_builder_get_object (gslapt_builder,"pkg_listing_treeview")),FALSE,NULL);
*/
- build_package_treeviewlist((GtkWidget *)lookup_widget(gslapt,"pkg_listing_treeview"));
+ build_package_treeviewlist(GTK_WIDGET(gtk_builder_get_object (gslapt_builder,"pkg_listing_treeview")));
- bar = GTK_STATUSBAR(lookup_widget(gslapt,"bottom_statusbar"));
+ bar = GTK_STATUSBAR(gtk_builder_get_object (gslapt_builder,"bottom_statusbar"));
default_context_id = gtk_statusbar_get_context_id(bar,"default");
gtk_statusbar_push(bar,default_context_id,(gchar *)_("Ready"));
- gtk_widget_set_sensitive(lookup_widget(gslapt,
- "action_bar_execute_button"),FALSE);
- gtk_widget_set_sensitive(lookup_widget(gslapt,"execute1"),FALSE);
- gtk_widget_set_sensitive(lookup_widget(gslapt,"unmark_all1"),FALSE);
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object (gslapt_builder,
+ "action_bar_execute_button")),FALSE);
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object (gslapt_builder,"execute1")),FALSE);
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object (gslapt_builder,"unmark_all1")),FALSE);
/* restore previous rc settings */
gslapt_settings = gslapt_read_rc();
@@ -200,10 +205,10 @@ int main (int argc, char *argv[]) {
gslapt_settings->x, gslapt_settings->y);
}
- gtk_widget_show (gslapt);
+ gtk_widget_show_all (gslapt);
if (do_upgrade == 1) {
- g_signal_emit_by_name(lookup_widget(gslapt,"action_bar_upgrade_button"),"clicked");
+ g_signal_emit_by_name(gtk_builder_get_object (gslapt_builder,"action_bar_upgrade_button"),"clicked");
} else {
if (pkg_inst_args_count > 0){
int i;
@@ -260,7 +265,7 @@ int main (int argc, char *argv[]) {
g_free(pkg_rem_args);
if ( trans->remove_pkgs->pkg_count > 0 || trans->install_pkgs->pkg_count > 0 || trans->upgrade_pkgs->pkg_count > 0) {
- g_signal_emit_by_name(lookup_widget(gslapt,"action_bar_execute_button"),"clicked");
+ g_signal_emit_by_name(gtk_builder_get_object (gslapt_builder,"action_bar_execute_button"),"clicked");
}
gdk_threads_enter();
diff --git a/ui/Makefile.am b/ui/Makefile.am
new file mode 100644
index 0000000..34a6061
--- /dev/null
+++ b/ui/Makefile.am
@@ -0,0 +1,19 @@
+gslapt_ui_FILES = \
+ about.ui \
+ changelog_window.ui \
+ dep_error_dialog.ui \
+ dl_progress_window.ui \
+ gslapt.ui \
+ icon_legend.ui \
+ notification.ui \
+ pkgtools_progress_window.ui \
+ repositories_changed.ui \
+ source_failed_dialog.ui \
+ source_window.ui \
+ transaction_window.ui \
+ window_preferences.ui
+
+EXTRA_DIST = $(gslapt_ui_FILES)
+
+# gslapt_uidir = $(pkgdatadir)/ui
+# gslapt_ui_DATA = $(gslapt_ui_FILES)
diff --git a/ui/about.ui b/ui/about.ui
new file mode 100644
index 0000000..f2b2400
--- /dev/null
+++ b/ui/about.ui
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk+" version="2.24"/>
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkDialog" id="about">
+ <property name="can_focus">False</property>
+ <property name="title" translatable="yes">About gslapt</property>
+ <property name="window_position">center</property>
+ <property name="destroy_with_parent">True</property>
+ <property name="icon">gslapt.png</property>
+ <property name="type_hint">dialog</property>
+ <property name="gravity">center</property>
+ <property name="has_separator">True</property>
+ <child internal-child="vbox">
+ <object class="GtkVBox" id="dialog-vbox1">
+ <property name="can_focus">False</property>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="closebutton1">
+ <property name="label">gtk-close</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ <signal name="clicked" handler="gtk_widget_destroy" object="about" swapped="yes"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox50">
+ <property name="can_focus">False</property>
+ <property name="homogeneous">True</property>
+ <child>
+ <object class="GtkImage" id="image853">
+ <property name="can_focus">False</property>
+ <property name="pixbuf">gslapt.png</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label146">
+ <property name="can_focus">True</property>
+ <property name="label">&lt;span weight="bold" size="xx-large"&gt;&lt;/span&gt;</property>
+ <property name="use_markup">True</property>
+ <property name="justify">right</property>
+ <property name="selectable">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label147">
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">gslapt is a GTK+ frontend to slapt-get, an APT like package system for Slackware</property>
+ <property name="justify">center</property>
+ <property name="wrap">True</property>
+ <property name="selectable">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label170">
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label149">
+ <property name="can_focus">True</property>
+ <property name="label">&lt;span size="small"&gt;Copyright (c) 2005-2014 Jason Woodward
+http://software.jaos.org/#gslapt&lt;/span&gt;</property>
+ <property name="use_markup">True</property>
+ <property name="justify">center</property>
+ <property name="selectable">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-7">closebutton1</action-widget>
+ </action-widgets>
+ </object>
+</interface>
diff --git a/ui/changelog_window.ui b/ui/changelog_window.ui
new file mode 100644
index 0000000..8437ee9
--- /dev/null
+++ b/ui/changelog_window.ui
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk+" version="2.24"/>
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkWindow" id="changelog_window">
+ <property name="can_focus">False</property>
+ <property name="title" translatable="yes">ChangeLogs</property>
+ <property name="default_width">640</property>
+ <property name="default_height">480</property>
+ <property name="icon">gslapt.png</property>
+ <signal name="destroy-event" handler="gtk_widget_destroy" swapped="no"/>
+ <signal name="configure-event" handler="gslapt_window_resized" swapped="no"/>
+ <child>
+ <object class="GtkVBox" id="vbox78">
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkNotebook" id="changelog_notebook">
+ <property name="can_focus">True</property>
+ <property name="scrollable">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHButtonBox" id="hbuttonbox3">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="button12">
+ <property name="label">gtk-close</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ <signal name="clicked" handler="gtk_widget_destroy" object="changelog_window" swapped="yes"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/ui/dep_error_dialog.ui b/ui/dep_error_dialog.ui
new file mode 100644
index 0000000..f1b5134
--- /dev/null
+++ b/ui/dep_error_dialog.ui
@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk+" version="2.24"/>
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkDialog" id="dep_error_dialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">2</property>
+ <property name="modal">True</property>
+ <property name="window_position">center</property>
+ <property name="icon">gslapt.png</property>
+ <property name="type_hint">dialog</property>
+ <property name="gravity">center</property>
+ <property name="has_separator">True</property>
+ <child internal-child="vbox">
+ <object class="GtkVBox" id="dialog-vbox6">
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="dialog-action_area6">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="dep_error_cancel_button">
+ <property name="label">gtk-cancel</property>
+ <property name="can_focus">True</property>
+ <property name="has_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="dep_error_install_button">
+ <property name="label">gtk-ok</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox113">
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkImage" id="image1261">
+ <property name="can_focus">False</property>
+ <property name="yalign">0.20000000298023224</property>
+ <property name="stock">gtk-dialog-error</property>
+ <property name="icon-size">6</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox72">
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkLabel" id="label285">
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="dep_error_label">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="use_markup">True</property>
+ <property name="wrap">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow22">
+ <property name="can_focus">True</property>
+ <property name="border_width">2</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <child>
+ <object class="GtkTextView" id="dep_error_text">
+ <property name="can_focus">True</property>
+ <property name="border_width">2</property>
+ <property name="cursor_visible">False</property>
+ <property name="accepts_tab">False</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label286">
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="dep_error_install_anyway_warning_label">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="use_markup">True</property>
+ <property name="wrap">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label284">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">5</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-6">dep_error_cancel_button</action-widget>
+ <action-widget response="-5">dep_error_install_button</action-widget>
+ </action-widgets>
+ </object>
+</interface>
diff --git a/ui/dl_progress_window.ui b/ui/dl_progress_window.ui
new file mode 100644
index 0000000..8df4711
--- /dev/null
+++ b/ui/dl_progress_window.ui
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk+" version="2.24"/>
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkWindow" id="dl_progress_window">
+ <property name="can_focus">False</property>
+ <property name="border_width">12</property>
+ <property name="title" translatable="yes">working</property>
+ <property name="modal">True</property>
+ <property name="window_position">center</property>
+ <property name="icon">gslapt.png</property>
+ <property name="gravity">center</property>
+ <signal name="delete-event" handler="gtk_true" swapped="no"/>
+ <child>
+ <object class="GtkVBox" id="vbox49">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="spacing">2</property>
+ <child>
+ <object class="GtkProgressBar" id="dl_progress_progressbar">
+ <property name="can_focus">False</property>
+ <property name="pulse_step">0.10000000149</property>
+ <property name="text" translatable="yes">total progress</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkProgressBar" id="dl_progress">
+ <property name="can_focus">False</property>
+ <property name="pulse_step">0.10000000149</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">2</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="progress_dl_speed">
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="dl_progress_action">
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="dl_progress_message">
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="dl_progress_package_description">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">5</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHButtonBox" id="hbuttonbox2">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="button4">
+ <property name="label">gtk-cancel</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ <signal name="clicked" handler="on_button_cancel_clicked" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">6</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/ui/gslapt.ui b/ui/gslapt.ui
new file mode 100644
index 0000000..b33cf65
--- /dev/null
+++ b/ui/gslapt.ui
@@ -0,0 +1,1130 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk+" version="2.12"/>
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkWindow" id="gslapt">
+ <property name="can_focus">False</property>
+ <property name="title" translatable="yes">Gslapt</property>
+ <property name="icon">gslapt.png</property>
+ <property name="gravity">center</property>
+ <signal name="destroy" handler="on_gslapt_destroy" swapped="no"/>
+ <signal name="configure-event" handler="gslapt_window_resized" swapped="no"/>
+ <child>
+ <object class="GtkVBox" id="gslapt_vbox">
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkMenuBar" id="top_menubar">
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkMenuItem" id="actions2">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_File</property>
+ <property name="use_underline">True</property>
+ <child type="submenu">
+ <object class="GtkMenu" id="actions2_menu">
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkImageMenuItem" id="update1">
+ <property name="label" translatable="yes">Update</property>
+ <property name="can_focus">False</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">False</property>
+ <accelerator key="y" signal="activate" modifiers="GDK_CONTROL_MASK"/>
+ <signal name="activate" handler="update_activate" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="mark_all_upgrades2">
+ <property name="label" translatable="yes">Mark All Upgrades</property>
+ <property name="can_focus">False</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">False</property>
+ <accelerator key="a" signal="activate" modifiers="GDK_CONTROL_MASK"/>
+ <signal name="activate" handler="mark_all_upgrades_activate" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="mark_obsolete1">
+ <property name="label" translatable="yes">Mark Obsolete</property>
+ <property name="can_focus">False</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">False</property>
+ <accelerator key="o" signal="activate" modifiers="GDK_CONTROL_MASK"/>
+ <signal name="activate" handler="mark_obsolete_packages" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="execute1">
+ <property name="label" translatable="yes">Execute</property>
+ <property name="can_focus">False</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">False</property>
+ <accelerator key="Return" signal="activate" modifiers="GDK_CONTROL_MASK"/>
+ <signal name="activate" handler="execute_activate" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem" id="separator2">
+ <property name="can_focus">False</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="quit">
+ <property name="label">gtk-quit</property>
+ <property name="can_focus">False</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ <signal name="activate" handler="on_gslapt_destroy" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="edit1">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Edit</property>
+ <property name="use_underline">True</property>
+ <child type="submenu">
+ <object class="GtkMenu" id="edit1_menu">
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkImageMenuItem" id="unmark_all1">
+ <property name="label" translatable="yes">Unmark All</property>
+ <property name="can_focus">False</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">False</property>
+ <accelerator key="z" signal="activate" modifiers="GDK_CONTROL_MASK"/>
+ <signal name="activate" handler="unmark_all_activate" swapped="no"/>
+ <signal name="activate" handler="unmark_all_activate" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem" id="separator1">
+ <property name="can_focus">False</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="preferences2">
+ <property name="label" translatable="yes">Preferences</property>
+ <property name="can_focus">False</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">False</property>
+ <accelerator key="p" signal="activate" modifiers="GDK_CONTROL_MASK"/>
+ <signal name="activate" handler="open_preferences" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="view1">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_View</property>
+ <property name="use_underline">True</property>
+ <child type="submenu">
+ <object class="GtkMenu" id="view1_menu">
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkRadioMenuItem" id="view_all_packages_menu">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">All</property>
+ <property name="use_underline">True</property>
+ <property name="active">True</property>
+ <accelerator key="F1" signal="activate"/>
+ <signal name="activate" handler="view_all_packages" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkRadioMenuItem" id="view_available_packages_menu">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Available</property>
+ <property name="use_underline">True</property>
+ <property name="group">view_all_packages_menu</property>
+ <accelerator key="F2" signal="activate"/>
+ <signal name="activate" handler="view_available_packages" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkRadioMenuItem" id="view_installed_packages_menu">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Installed</property>
+ <property name="use_underline">True</property>
+ <property name="group">view_all_packages_menu</property>
+ <accelerator key="F3" signal="activate"/>
+ <signal name="activate" handler="view_installed_packages" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkRadioMenuItem" id="view_marked_packages_menu">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Marked</property>
+ <property name="use_underline">True</property>
+ <property name="group">view_all_packages_menu</property>
+ <accelerator key="F4" signal="activate"/>
+ <signal name="activate" handler="view_marked_packages" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkRadioMenuItem" id="view_upgradeable_packages_menu">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Upgradeable</property>
+ <property name="use_underline">True</property>
+ <property name="group">view_all_packages_menu</property>
+ <accelerator key="F5" signal="activate"/>
+ <signal name="activate" handler="view_upgradeable_packages" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="package1">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">P_ackage</property>
+ <property name="use_underline">True</property>
+ <child type="submenu">
+ <object class="GtkMenu" id="package1_menu">
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkImageMenuItem" id="unmark1">
+ <property name="label" translatable="yes">Unmark</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">False</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">False</property>
+ <accelerator key="n" signal="activate" modifiers="GDK_CONTROL_MASK"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="install1">
+ <property name="label" translatable="yes">Install</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">False</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">False</property>
+ <accelerator key="i" signal="activate" modifiers="GDK_CONTROL_MASK"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="re-install1">
+ <property name="label" translatable="yes">Re-Install</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">False</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">False</property>
+ <accelerator key="e" signal="activate" modifiers="GDK_CONTROL_MASK"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="upgrade1">
+ <property name="label" translatable="yes">Upgrade</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">False</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">False</property>
+ <accelerator key="u" signal="activate" modifiers="GDK_CONTROL_MASK"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="downgrade1">
+ <property name="label" translatable="yes">Downgrade</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">False</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">False</property>
+ <accelerator key="d" signal="activate" modifiers="GDK_CONTROL_MASK"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="remove1">
+ <property name="label" translatable="yes">Remove</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">False</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">False</property>
+ <accelerator key="r" signal="activate" modifiers="GDK_CONTROL_MASK"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="help3">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Help</property>
+ <property name="use_underline">True</property>
+ <child type="submenu">
+ <object class="GtkMenu" id="help3_menu">
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkImageMenuItem" id="icon_legend1">
+ <property name="label" translatable="yes">Icon Legend</property>
+ <property name="can_focus">False</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">False</property>
+ <signal name="activate" handler="open_icon_legend" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="changelogs_menu">
+ <property name="label" translatable="yes">ChangeLogs</property>
+ <property name="can_focus">False</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">False</property>
+ <signal name="activate" handler="view_changelogs" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="about3">
+ <property name="label" translatable="yes">About</property>
+ <property name="can_focus">False</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">False</property>
+ <signal name="activate" handler="open_about" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolbar" id="action_toolbar">
+ <property name="can_focus">False</property>
+ <property name="toolbar_style">both</property>
+ <child>
+ <object class="GtkToolButton" id="action_bar_update_button">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Update</property>
+ <property name="use_underline">True</property>
+ <property name="stock_id">gtk-refresh</property>
+ <signal name="clicked" handler="update_callback" object="gslapt" swapped="yes"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="action_bar_upgrade_button">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Mark All Upgrades</property>
+ <property name="use_underline">True</property>
+ <property name="stock_id">gtk-go-up</property>
+ <signal name="clicked" handler="upgrade_callback" object="gslapt" swapped="yes"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSeparatorToolItem" id="separatortoolitem1">
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="action_bar_execute_button">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Execute</property>
+ <property name="use_underline">True</property>
+ <property name="stock_id">gtk-apply</property>
+ <signal name="clicked" handler="execute_callback" object="gslapt" swapped="yes"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="search_vbox">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkAlignment" id="search_align">
+ <property name="can_focus">False</property>
+ <property name="border_width">1</property>
+ <child>
+ <object class="GtkHBox" id="search_hbox">
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkLabel" id="label292">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Search</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="search_entry">
+ <property name="can_focus">True</property>
+ <property name="has_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="primary_icon_activatable">False</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="primary_icon_sensitive">True</property>
+ <property name="secondary_icon_sensitive">True</property>
+ <accelerator key="L" signal="grab_focus" modifiers="GDK_CONTROL_MASK"/>
+ <signal name="activate" handler="search_activated" object="gslapt" swapped="yes"/>
+ <signal name="editing-done" handler="search_activated" object="gslapt" swapped="yes"/>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVPaned" id="pkg_vpaned">
+ <property name="can_focus">True</property>
+ <property name="border_width">6</property>
+ <child>
+ <object class="GtkScrolledWindow" id="pkg_list_scrolled">
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <child>
+ <object class="GtkTreeView" id="pkg_listing_treeview">
+ <property name="can_focus">True</property>
+ <property name="rules_hint">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="resize">True</property>
+ <property name="shrink">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkNotebook" id="pkg_info_notebook">
+ <property name="can_focus">True</property>
+ <property name="border_width">6</property>
+ <property name="show_border">False</property>
+ <property name="scrollable">True</property>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow20">
+ <property name="can_focus">True</property>
+ <property name="border_width">12</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <child>
+ <object class="GtkViewport" id="viewport1">
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkVBox" id="vbox63">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="spacing">18</property>
+ <child>
+ <object class="GtkTable" id="table2">
+ <property name="can_focus">False</property>
+ <property name="n_rows">7</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">12</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label226">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">&lt;b&gt;Name:&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="pkg_info_name">
+ <property name="can_focus">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">No package is selected.</property>
+ <property name="use_markup">True</property>
+ <property name="selectable">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label250">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">&lt;b&gt;Status:&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label227">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">&lt;b&gt;Description:&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="pkg_info_description">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label273">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">&lt;b&gt;Version:&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="pkg_info_version">
+ <property name="can_focus">True</property>
+ <property name="xalign">0</property>
+ <property name="use_markup">True</property>
+ <property name="selectable">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="pkg_info_status">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label291">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">&lt;b&gt;Source:&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="pkg_info_source">
+ <property name="can_focus">True</property>
+ <property name="xalign">0</property>
+ <property name="use_markup">True</property>
+ <property name="selectable">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label298">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">&lt;b&gt;Priority:&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="pkg_info_priority">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label244">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">&lt;b&gt;Location:&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="pkg_info_location">
+ <property name="can_focus">True</property>
+ <property name="xalign">0</property>
+ <property name="use_markup">True</property>
+ <property name="selectable">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox67">
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkLabel" id="label272">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">&lt;b&gt;Installed Version&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox106">
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkLabel" id="label271">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label"> </property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkTable" id="table3">
+ <property name="can_focus">False</property>
+ <property name="border_width">1</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">12</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label237">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Version:</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="pkg_info_installed_version">
+ <property name="can_focus">True</property>
+ <property name="xalign">0</property>
+ <property name="use_markup">True</property>
+ <property name="selectable">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label239">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Installed Size:</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="pkg_info_installed_installed_size">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox66">
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label261">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">&lt;b&gt;Latest Available Version&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox105">
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkLabel" id="label262">
+ <property name="can_focus">False</property>
+ <property name="label"> </property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkTable" id="table5">
+ <property name="can_focus">False</property>
+ <property name="n_rows">4</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">12</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label263">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Version:</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label264">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Size:</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label265">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Installed Size:</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label266">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Source:</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="pkg_info_available_version">
+ <property name="can_focus">True</property>
+ <property name="xalign">0</property>
+ <property name="use_markup">True</property>
+ <property name="selectable">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="pkg_info_available_size">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="pkg_info_available_installed_size">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="pkg_info_available_source">
+ <property name="can_focus">True</property>
+ <property name="xalign">0</property>
+ <property name="use_markup">True</property>
+ <property name="selectable">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="pkg_info_common_label">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Common</property>
+ </object>
+ <packing>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox64">
+ <property name="can_focus">False</property>
+ <property name="border_width">12</property>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow19">
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkTextView" id="pkg_description_textview">
+ <property name="can_focus">True</property>
+ <property name="editable">False</property>
+ <property name="cursor_visible">False</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="pkg_info_description_label">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Description</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow21">
+ <property name="can_focus">True</property>
+ <property name="border_width">12</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <child>
+ <object class="GtkTreeView" id="dep_conf_sug_treeview">
+ <property name="can_focus">True</property>
+ <property name="headers_visible">False</property>
+ <property name="enable_search">False</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="pkg_info_dependencies_label">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Dependencies</property>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow23">
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkTextView" id="pkg_changelog_textview">
+ <property name="can_focus">True</property>
+ <property name="editable">False</property>
+ <property name="wrap_mode">word</property>
+ <property name="cursor_visible">False</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="pkg_info_changelog">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Changelog</property>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow25">
+ <property name="can_focus">True</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkTextView" id="pkg_filelist_textview">
+ <property name="can_focus">True</property>
+ <property name="editable">False</property>
+ <property name="wrap_mode">word</property>
+ <property name="cursor_visible">False</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="pkg_info_filelist">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Files</property>
+ </object>
+ <packing>
+ <property name="position">4</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="resize">True</property>
+ <property name="shrink">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkStatusbar" id="bottom_statusbar">
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/ui/icon_legend.ui b/ui/icon_legend.ui
new file mode 100644
index 0000000..fb209d0
--- /dev/null
+++ b/ui/icon_legend.ui
@@ -0,0 +1,437 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk+" version="2.24"/>
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkDialog" id="icon_legend">
+ <property name="can_focus">False</property>
+ <property name="border_width">2</property>
+ <property name="title" translatable="yes">Icon Legend</property>
+ <property name="window_position">center</property>
+ <property name="icon">gslapt.png</property>
+ <property name="type_hint">dialog</property>
+ <property name="gravity">center</property>
+ <property name="has_separator">True</property>
+ <child internal-child="vbox">
+ <object class="GtkVBox" id="dialog-vbox4">
+ <property name="can_focus">False</property>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="dialog-action_area4">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="closebutton2">
+ <property name="label">gtk-close</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ <signal name="clicked" handler="gtk_widget_destroy" object="icon_legend" swapped="yes"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox65">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label252">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">&lt;b&gt;The following icons are used to indicate the current status of a package:&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ <property name="wrap">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label260">
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox98">
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkImage" id="image865">
+ <property name="can_focus">False</property>
+ <property name="pixbuf">pkg_action_available.png</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label253">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Not Installed</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox109">
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkImage" id="image1257">
+ <property name="can_focus">False</property>
+ <property name="pixbuf">pkg_action_available_excluded.png</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label277">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Not Installed</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label280">
+ <property name="can_focus">False</property>
+ <property name="label">/</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label281">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Excluded</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="padding">6</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox99">
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkImage" id="image866">
+ <property name="can_focus">False</property>
+ <property name="pixbuf">pkg_action_installed.png</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label254">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Installed</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox108">
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkImage" id="image1256">
+ <property name="can_focus">False</property>
+ <property name="pixbuf">pkg_action_installed_excluded.png</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label276">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Installed</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label278">
+ <property name="can_focus">False</property>
+ <property name="label">/</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label279">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Excluded</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">5</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox100">
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkImage" id="image867">
+ <property name="can_focus">False</property>
+ <property name="pixbuf">pkg_action_install.png</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label255">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">To be Installed</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">6</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox101">
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkImage" id="image868">
+ <property name="can_focus">False</property>
+ <property name="pixbuf">pkg_action_reinstall.png</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label256">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">To be Re-Installed</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">7</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox102">
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkImage" id="image869">
+ <property name="can_focus">False</property>
+ <property name="pixbuf">pkg_action_upgrade.png</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label257">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">To be Upgraded</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">8</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox103">
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkImage" id="image870">
+ <property name="can_focus">False</property>
+ <property name="pixbuf">pkg_action_remove.png</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label258">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">To be Removed</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">9</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox104">
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkImage" id="image871">
+ <property name="can_focus">False</property>
+ <property name="pixbuf">pkg_action_downgrade.png</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label259">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">To be Downgraded</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">10</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-7">closebutton2</action-widget>
+ </action-widgets>
+ </object>
+</interface>
diff --git a/ui/notification.ui b/ui/notification.ui
new file mode 100644
index 0000000..c0089bf
--- /dev/null
+++ b/ui/notification.ui
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk+" version="2.24"/>
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkDialog" id="notification">
+ <property name="can_focus">False</property>
+ <property name="border_width">2</property>
+ <property name="modal">True</property>
+ <property name="window_position">center</property>
+ <property name="icon">gslapt.png</property>
+ <property name="type_hint">dialog</property>
+ <property name="gravity">center</property>
+ <property name="has_separator">True</property>
+ <child internal-child="vbox">
+ <object class="GtkVBox" id="dialog-vbox3">
+ <property name="can_focus">False</property>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="dialog-action_area3">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="okbutton2">
+ <property name="label">gtk-close</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ <signal name="clicked" handler="gtk_widget_destroy" object="notification" swapped="yes"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox112">
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkImage" id="image1260">
+ <property name="can_focus">False</property>
+ <property name="yalign">0.20000000298023224</property>
+ <property name="stock">gtk-dialog-info</property>
+ <property name="icon-size">6</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="notification_label">
+ <property name="can_focus">False</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="padding">2</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-7">okbutton2</action-widget>
+ </action-widgets>
+ </object>
+</interface>
diff --git a/ui/pkgtools_progress_window.ui b/ui/pkgtools_progress_window.ui
new file mode 100644
index 0000000..d9d6b95
--- /dev/null
+++ b/ui/pkgtools_progress_window.ui
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk+" version="2.24"/>
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkWindow" id="pkgtools_progress_window">
+ <property name="can_focus">False</property>
+ <property name="border_width">12</property>
+ <property name="title" translatable="yes">working</property>
+ <property name="modal">True</property>
+ <property name="window_position">center</property>
+ <property name="icon">gslapt.png</property>
+ <property name="gravity">center</property>
+ <signal name="delete-event" handler="gtk_true" swapped="no"/>
+ <child>
+ <object class="GtkVBox" id="vbox68">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="spacing">2</property>
+ <child>
+ <object class="GtkProgressBar" id="progress_progressbar">
+ <property name="can_focus">False</property>
+ <property name="pulse_step">0.10000000149</property>
+ <property name="text" translatable="yes">total progress</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="progress_action">
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="padding">2</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="progress_message">
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="padding">6</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="progress_package_description">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="padding">6</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/ui/repositories_changed.ui b/ui/repositories_changed.ui
new file mode 100644
index 0000000..7b3e8b7
--- /dev/null
+++ b/ui/repositories_changed.ui
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk+" version="2.24"/>
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkDialog" id="repositories_changed">
+ <property name="can_focus">False</property>
+ <property name="title" translatable="yes">Repositories changed</property>
+ <property name="modal">True</property>
+ <property name="icon">gslapt.png</property>
+ <property name="type_hint">dialog</property>
+ <property name="has_separator">True</property>
+ <child internal-child="vbox">
+ <object class="GtkVBox" id="dialog-vbox5">
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="dialog-action_area5">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="button5">
+ <property name="label">gtk-no</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ <signal name="clicked" handler="gtk_widget_destroy" object="repositories_changed" swapped="yes"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button6">
+ <property name="label">gtk-yes</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ <signal name="clicked" handler="repositories_changed_callback" object="repositories_changed" swapped="yes"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox114">
+ <property name="can_focus">False</property>
+ <property name="border_width">2</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkImage" id="image1299">
+ <property name="can_focus">False</property>
+ <property name="yalign">0.20000000298023224</property>
+ <property name="stock">gtk-dialog-info</property>
+ <property name="icon-size">6</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox73">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label287">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">&lt;span size="large" weight="bold"&gt;Repositories changed&lt;/span&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="padding">6</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label288">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes">You need to reload the package list from the sources you have listed. Do you want to do this now?</property>
+ <property name="use_markup">True</property>
+ <property name="wrap">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-9">button5</action-widget>
+ <action-widget response="-8">button6</action-widget>
+ </action-widgets>
+ </object>
+</interface>
diff --git a/ui/source_failed_dialog.ui b/ui/source_failed_dialog.ui
new file mode 100644
index 0000000..29925e8
--- /dev/null
+++ b/ui/source_failed_dialog.ui
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk+" version="2.24"/>
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkDialog" id="source_failed_dialog">
+ <property name="can_focus">False</property>
+ <property name="title" translatable="yes">Source failed</property>
+ <property name="icon">gslapt.png</property>
+ <property name="type_hint">dialog</property>
+ <property name="has_separator">True</property>
+ <child internal-child="vbox">
+ <object class="GtkVBox" id="dialog-vbox7">
+ <property name="can_focus">False</property>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="dialog-action_area7">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="cancelbutton1">
+ <property name="label">gtk-no</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="okbutton3">
+ <property name="label">gtk-yes</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox115">
+ <property name="can_focus">False</property>
+ <property name="border_width">2</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkImage" id="image1300">
+ <property name="can_focus">False</property>
+ <property name="yalign">0.20000000298023224</property>
+ <property name="stock">gtk-dialog-error</property>
+ <property name="icon-size">6</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox74">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="failed_source_label">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="padding">6</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label290">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes">This package source failed or is not available. Do you want to disable this source and continue anyway?</property>
+ <property name="use_markup">True</property>
+ <property name="wrap">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-9">cancelbutton1</action-widget>
+ <action-widget response="-8">okbutton3</action-widget>
+ </action-widgets>
+ </object>
+</interface>
diff --git a/ui/source_window.ui b/ui/source_window.ui
new file mode 100644
index 0000000..195e11c
--- /dev/null
+++ b/ui/source_window.ui
@@ -0,0 +1,167 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk+" version="2.24"/>
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkListStore" id="source_priorities">
+ <columns>
+ <!-- column-name priority -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Default</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Official</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Preferred</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Custom</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkWindow" id="source_window">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Package Source</property>
+ <property name="modal">True</property>
+ <property name="window_position">center</property>
+ <property name="icon">gslapt.png</property>
+ <child>
+ <object class="GtkVBox" id="vbox79">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <child>
+ <object class="GtkTable" id="table6">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="priority_label">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">&lt;b&gt;Priority:&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ <property name="x_padding">6</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="source_label">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">&lt;b&gt;Source:&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ <property name="x_padding">6</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="source_entry">
+ <property name="can_focus">True</property>
+ <property name="invisible_char">‚óŹ</property>
+ <property name="width_chars">60</property>
+ <property name="primary_icon_activatable">False</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="primary_icon_sensitive">True</property>
+ <property name="secondary_icon_sensitive">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="y_options">GTK_EXPAND</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="source_priority">
+ <property name="can_focus">False</property>
+ <property name="model">source_priorities</property>
+ <property name="active">0</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext1"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHButtonBox" id="hbuttonbox4">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="button13">
+ <property name="label">gtk-cancel</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ <signal name="clicked" handler="cancel_source_edit" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button14">
+ <property name="label">gtk-ok</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ <signal name="clicked" handler="source_edit_ok" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <object class="GtkListStore" id="source_priorities">
+ <columns>
+ <!-- column-name Priority -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ </data>
+ </object>
+</interface>
diff --git a/ui/transaction_window.ui b/ui/transaction_window.ui
new file mode 100644
index 0000000..4833d01
--- /dev/null
+++ b/ui/transaction_window.ui
@@ -0,0 +1,238 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk+" version="2.24"/>
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkWindow" id="transaction_window">
+ <property name="can_focus">False</property>
+ <property name="border_width">12</property>
+ <property name="title" translatable="yes">Summary</property>
+ <property name="modal">True</property>
+ <property name="window_position">center</property>
+ <property name="default_width">200</property>
+ <property name="default_height">400</property>
+ <property name="icon">gslapt.png</property>
+ <property name="gravity">center</property>
+ <signal name="destroy-event" handler="gtk_widget_destroy" swapped="no"/>
+ <signal name="configure-event" handler="gslapt_window_resized" swapped="no"/>
+ <child>
+ <object class="GtkVBox" id="vbox47">
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkVBox" id="vbox61">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="spacing">2</property>
+ <child>
+ <object class="GtkHBox" id="hbox97">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="spacing">2</property>
+ <child>
+ <object class="GtkImage" id="image852">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="stock">gtk-dialog-question</property>
+ <property name="icon-size">6</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox62">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="spacing">2</property>
+ <child>
+ <object class="GtkLabel" id="label167">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes">&lt;span weight="bold" size="large"&gt;Apply the following changes?&lt;/span&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label168">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="ypad">6</property>
+ <property name="label" translatable="yes">This is a summary of the changes about to be performed.</property>
+ <property name="wrap">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow18">
+ <property name="can_focus">True</property>
+ <property name="border_width">1</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <child>
+ <object class="GtkTreeView" id="transaction_summary_treeview">
+ <property name="can_focus">True</property>
+ <property name="headers_visible">False</property>
+ <property name="rules_hint">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="summary_breakdown">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="spacing">2</property>
+ <child>
+ <object class="GtkLabel" id="summary_pkg_numbers">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="xpad">6</property>
+ <property name="ypad">1</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="summary_dl_size">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="xpad">6</property>
+ <property name="ypad">1</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="summary_free_space">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="xpad">6</property>
+ <property name="ypad">1</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="download_only_checkbutton">
+ <property name="label" translatable="yes">Download packages only</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="padding">2</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHButtonBox" id="hbuttonbox1">
+ <property name="can_focus">False</property>
+ <property name="border_width">2</property>
+ <property name="spacing">6</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="button2">
+ <property name="label">gtk-cancel</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ <signal name="clicked" handler="cancel_transaction" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button3">
+ <property name="label">gtk-ok</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ <signal name="clicked" handler="transaction_okbutton_clicked" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">1</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/ui/window_preferences.ui b/ui/window_preferences.ui
new file mode 100644
index 0000000..50ab080
--- /dev/null
+++ b/ui/window_preferences.ui
@@ -0,0 +1,636 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk+" version="2.24"/>
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkWindow" id="window_preferences">
+ <property name="can_focus">False</property>
+ <property name="title" translatable="yes">Preferences</property>
+ <property name="modal">True</property>
+ <property name="window_position">center</property>
+ <property name="default_width">400</property>
+ <property name="default_height">300</property>
+ <property name="icon">gslapt.png</property>
+ <property name="gravity">center</property>
+ <signal name="destroy-event" handler="gtk_widget_destroy" swapped="no"/>
+ <signal name="configure-event" handler="gslapt_window_resized" swapped="no"/>
+ <child>
+ <object class="GtkVBox" id="preferences_vbox">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <child>
+ <object class="GtkNotebook" id="preferences_notebook">
+ <property name="can_focus">True</property>
+ <property name="border_width">6</property>
+ <child>
+ <object class="GtkVBox" id="preferences_working_dir_vbox">
+ <property name="can_focus">False</property>
+ <property name="border_width">12</property>
+ <property name="spacing">18</property>
+ <child>
+ <object class="GtkVBox" id="preferences_working_dir_vbox_vbox">
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="preferences_working_dir_label">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">&lt;b&gt;Package and data storage&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox3">
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkLabel" id="label72">
+ <property name="can_focus">False</property>
+ <property name="label"> </property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox12">
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkEntry" id="preferences_working_dir_entry">
+ <property name="can_focus">True</property>
+ <property name="primary_icon_activatable">False</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="primary_icon_sensitive">True</property>
+ <property name="secondary_icon_sensitive">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button7">
+ <property name="label" translatable="yes">_Delete Cached Package Files</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <signal name="clicked" handler="clean_callback" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label50">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Working Directory</property>
+ <property name="justify">center</property>
+ </object>
+ <packing>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="preferences_exclude_vbox">
+ <property name="can_focus">False</property>
+ <property name="border_width">12</property>
+ <property name="spacing">18</property>
+ <child>
+ <object class="GtkVBox" id="preferences_exclude_vbox_vbox">
+ <property name="can_focus">False</property>
+ <property name="border_width">12</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="preferences_exclude_label">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">&lt;b&gt;Exclude List&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox81">
+ <property name="height_request">174</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkLabel" id="label140">
+ <property name="can_focus">False</property>
+ <property name="label"> </property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox82">
+ <property name="can_focus">False</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow12">
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkTreeView" id="preferences_exclude_treeview">
+ <property name="can_focus">True</property>
+ <property name="headers_visible">False</property>
+ <property name="reorderable">True</property>
+ <property name="rules_hint">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox42">
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkButton" id="preferences_remove_exclude_button">
+ <property name="label">gtk-remove</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ <signal name="clicked" handler="preferences_exclude_remove" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox95">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="spacing">2</property>
+ <child>
+ <object class="GtkLabel" id="label164">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">&lt;span weight="bold"&gt;Exclude Expression:&lt;/span&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="new_exclude_entry">
+ <property name="can_focus">True</property>
+ <property name="primary_icon_activatable">False</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="primary_icon_sensitive">True</property>
+ <property name="secondary_icon_sensitive">True</property>
+ <signal name="activate" handler="preferences_exclude_add" swapped="no"/>
+ <signal name="editing-done" handler="preferences_exclude_add" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="preferences_add_exclude_button">
+ <property name="label">gtk-add</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ <signal name="clicked" handler="preferences_exclude_add" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label51">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Excludes</property>
+ <property name="justify">center</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="preferences_sources_vbox">
+ <property name="can_focus">False</property>
+ <property name="border_width">12</property>
+ <property name="spacing">18</property>
+ <child>
+ <object class="GtkVBox" id="vbox57">
+ <property name="can_focus">False</property>
+ <property name="border_width">12</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label161">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">&lt;b&gt;Package Sources&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox92">
+ <property name="height_request">174</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkLabel" id="label162">
+ <property name="can_focus">False</property>
+ <property name="label"> </property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox93">
+ <property name="can_focus">False</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow16">
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkTreeView" id="preferences_sources_treeview">
+ <property name="can_focus">True</property>
+ <property name="reorderable">True</property>
+ <property name="rules_hint">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox58">
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkButton" id="preferences_add_source_button">
+ <property name="label">gtk-add</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ <signal name="clicked" handler="preferences_sources_add" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button8">
+ <property name="label">gtk-edit</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ <signal name="clicked" handler="preferences_sources_edit" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="preferences_remove_source_button">
+ <property name="label">gtk-remove</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ <signal name="clicked" handler="preferences_sources_remove" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label160">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Sources</property>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="preferences_verification_vbox">
+ <property name="can_focus">False</property>
+ <property name="border_width">12</property>
+ <property name="spacing">18</property>
+ <child>
+ <object class="GtkVBox" id="vbox76">
+ <property name="can_focus">False</property>
+ <property name="border_width">12</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label294">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">&lt;b&gt;GPG Keys&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox116">
+ <property name="height_request">174</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkLabel" id="label295">
+ <property name="can_focus">False</property>
+ <property name="label"> </property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox117">
+ <property name="can_focus">False</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow24">
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkTreeView" id="preferences_verification_sources_treeview">
+ <property name="can_focus">True</property>
+ <property name="reorderable">True</property>
+ <property name="rules_hint">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox77">
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkButton" id="button9">
+ <property name="label">gtk-add</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ <signal name="clicked" handler="preferences_sources_add_key" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label293">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Verification</property>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHButtonBox" id="preferences_hbuttonbox">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="spacing">6</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="preferences_close_button">
+ <property name="label">gtk-cancel</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ <signal name="clicked" handler="cancel_preferences" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="preferences_ok_button">
+ <property name="label">gtk-ok</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ <signal name="clicked" handler="preferences_on_ok_clicked" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>