aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2005-09-28 08:46:22 +0000
committerJason Woodward2005-09-28 08:46:22 +0000
commit304512eb56b53c8b469d7f437d7b72c9383fc3b3 (patch)
tree35ddf0e8cafad54a04938b7aa55eab8851751640
parentd8c6f87c11d60f74083bb99c026de0b5a3451f6d (diff)
downloadgslapt-304512eb56b53c8b469d7f437d7b72c9383fc3b3.tar.gz
updated for new libslapt (0.9.10d)
-rw-r--r--ChangeLog3
-rw-r--r--configure.in2
-rw-r--r--slack-required2
-rw-r--r--src/callbacks.c41
-rw-r--r--src/main.c5
5 files changed, 13 insertions, 40 deletions
diff --git a/ChangeLog b/ChangeLog
index 7532ea9..77260c0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
-0.3.8 Sept 22, 2005
+0.3.8 Sept 28, 2005
+ * updated for new libslapt (0.9.10d)
* added Brazillian translation authored by Frederico Henrique Gonçalves Lima
* improved package cache updating, removing use of tmpfile and disk i/o
* added Russian and Unkrainian translations by sin of the DeepStyle team
diff --git a/configure.in b/configure.in
index 26589dd..012e9f1 100644
--- a/configure.in
+++ b/configure.in
@@ -20,7 +20,7 @@ AC_CHECK_HEADER(curl/curl.h, [], [AC_MSG_ERROR(libcurl headers are missing)])
AC_CHECK_HEADER(slapt.h, [], [AC_MSG_ERROR(libslapt headers are missing)])
AC_CHECK_LIB(z,gzopen, [LIBS="$LIBS -lz"], [AC_MSG_ERROR(libz is missing)])
AC_CHECK_LIB(curl,curl_global_init, [LIBS="$LIBS `curl-config --libs`"], [AC_MSG_ERROR(curl libs are missing)])
-AC_CHECK_LIB(slapt,slapt_remove_source, [], [AC_MSG_ERROR(libslapt 0.9.10c or greater is required)])
+AC_CHECK_LIB(slapt,slapt_remove_exclude, [], [AC_MSG_ERROR(libslapt 0.9.10d or greater is required)])
LIBS="$LIBS -lglib-2.0 -lgthread-2.0"
pkg_modules="gtk+-2.0 >= 2.4.0"
diff --git a/slack-required b/slack-required
index d60d51d..716c8d9 100644
--- a/slack-required
+++ b/slack-required
@@ -6,4 +6,4 @@ x11 >= 6.7.0-i486-4
gtk+2 >= 2.4.10-i486-1
atk >= 1.6.1-i486-1
pango >= 1.4.0-i486-1
-slapt-get >= 0.9.10c-i386-1
+slapt-get >= 0.9.10d-i386-1
diff --git a/src/callbacks.c b/src/callbacks.c
index 8761f06..1455f2a 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -1115,7 +1115,7 @@ static void get_package_data (void)
/* reset our currently selected packages */
slapt_free_transaction(trans);
- slapt_init_transaction(trans);
+ trans = slapt_init_transaction();
gdk_threads_enter();
unlock_toolbar_buttons();
@@ -1278,7 +1278,7 @@ static void lhandle_transaction (GtkWidget *w)
/* return early if download_only is set */
if ( dl_only == TRUE ) {
slapt_free_transaction(trans);
- slapt_init_transaction(trans);
+ trans = slapt_init_transaction();
gdk_threads_enter();
unlock_toolbar_buttons();
rebuild_treeviews(NULL,FALSE);
@@ -1316,7 +1316,7 @@ static void lhandle_transaction (GtkWidget *w)
gdk_cursor_destroy(c);
slapt_free_transaction(trans);
- slapt_init_transaction(trans);
+ trans = slapt_init_transaction();
/* rebuild the installed list */
installed_ptr = installed;
installed = slapt_get_installed_pkgs();
@@ -2100,7 +2100,6 @@ void preferences_exclude_remove(GtkWidget *w, gpointer user_data)
if ( gtk_tree_selection_get_selected(select,&model,&iter)) {
guint i = 0;
- gchar *tmp = NULL;
gchar *exclude;
GList *columns;
@@ -2118,38 +2117,12 @@ void preferences_exclude_remove(GtkWidget *w, gpointer user_data)
}
g_list_free(columns);
- i = 0;
- while (i < global_config->exclude_list->count) {
- if ( strcmp(exclude,global_config->exclude_list->excludes[i]) == 0 && tmp == NULL ) {
- tmp = global_config->exclude_list->excludes[i];
- }
- if ( tmp != NULL && (i+1 < global_config->exclude_list->count) ) {
- global_config->exclude_list->excludes[i] = global_config->exclude_list->excludes[i + 1];
- }
- ++i;
- }
- if ( tmp != NULL ) {
- char **realloc_tmp;
- int count = global_config->exclude_list->count - 1;
- if ( count < 1 )
- count = 1;
-
- free(tmp);
-
- realloc_tmp = realloc(
- global_config->exclude_list->excludes,
- sizeof *global_config->exclude_list->excludes * count
- );
- if ( realloc_tmp != NULL ) {
- global_config->exclude_list->excludes = realloc_tmp;
- if ( global_config->exclude_list->count > 0 ) --global_config->exclude_list->count;
- }
-
- excludes_modified = TRUE;
- }
+ slapt_remove_exclude(global_config->exclude_list,exclude);
g_free(exclude);
+ excludes_modified = TRUE;
+
build_exclude_treeviewlist((GtkWidget *)exclude_tree);
}
@@ -2812,7 +2785,7 @@ void unmark_all_activate (GtkMenuItem *menuitem, gpointer user_data)
/* reset our currently selected packages */
slapt_free_transaction(trans);
- slapt_init_transaction(trans);
+ trans = slapt_init_transaction();
rebuild_package_action_menu();
rebuild_treeviews(NULL,FALSE);
diff --git a/src/main.c b/src/main.c
index 3400fd9..a575c5e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -29,8 +29,7 @@ slapt_rc_config *global_config; /* our config struct */
struct slapt_pkg_list *installed;
struct slapt_pkg_list *all;
GtkWidget *gslapt;
-slapt_transaction_t tran;
-slapt_transaction_t *trans = &tran;
+slapt_transaction_t *trans = NULL;
char rc_location[1024];
struct slapt_source_list *disabled_sources;
@@ -57,7 +56,7 @@ int main (int argc, char *argv[]) {
gdk_threads_init();
gtk_init (&argc, &argv);
- slapt_init_transaction(trans);
+ trans = slapt_init_transaction();
add_pixmap_directory (PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps");