aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2008-11-28 06:33:26 +0000
committerJason Woodward2008-11-28 06:33:26 +0000
commit776df6e7f4acda1a36996d656a1af89e71875954 (patch)
treeccab0c0363c511ff6cdc40ab49b6df3fdaf364f0
parentea66d7d00b70667d3b83e5de9f0f7e2e08604846 (diff)
downloadgslapt-776df6e7f4acda1a36996d656a1af89e71875954.tar.gz
* added priority to source management
* modified source management to use a new window for adding and editing the source. * updated for new libslapt changes
-rw-r--r--ChangeLog6
-rw-r--r--configure.in4
-rw-r--r--gslapt.glade281
-rw-r--r--po/bg.po28
-rw-r--r--po/de.po29
-rw-r--r--po/en.po28
-rw-r--r--po/es.po28
-rw-r--r--po/fr.po28
-rw-r--r--po/gl_ES.po28
-rw-r--r--po/gslapt.pot28
-rw-r--r--po/id.po28
-rw-r--r--po/it.po28
-rw-r--r--po/ja.po28
-rw-r--r--po/nl.po28
-rw-r--r--po/pl.po28
-rw-r--r--po/pt.po28
-rw-r--r--po/pt_BR.po28
-rw-r--r--po/ru.po28
-rw-r--r--po/sk.po28
-rw-r--r--po/sv.po28
-rw-r--r--po/tr.po28
-rw-r--r--po/uk.po28
-rw-r--r--po/vi.po28
-rw-r--r--po/zh_CN.po28
-rw-r--r--src/callbacks.c336
-rw-r--r--src/callbacks.h3
-rw-r--r--src/interface.c186
-rw-r--r--src/interface.h1
-rw-r--r--src/main.c3
29 files changed, 1057 insertions, 352 deletions
diff --git a/ChangeLog b/ChangeLog
index 00eed73..38af640 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
-0.4.0a May 26, 2008
+0.5.0 Nov 28, 2008
+ * added priority to source management
+ * modified source management to use a new window for adding and editing
+ the source.
+ * updated for new libslapt changes
* German translation updates by Manfred.
0.4.0 Mar 30, 2008
diff --git a/configure.in b/configure.in
index 2bda24d..70ef813 100644
--- a/configure.in
+++ b/configure.in
@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
AC_INIT
AC_CONFIG_SRCDIR([configure.in])
-AM_INIT_AUTOMAKE(gslapt, 0.4.0a)
+AM_INIT_AUTOMAKE(gslapt, 0.5.0)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
@@ -39,7 +39,7 @@ AC_CHECK_LIB(gpgme,gpgme_new, [
[AC_DEFINE(SLAPT_HAS_GPGME, 1, [libslapt has builtin gpgme support])],
[AC_MSG_WARN(libslapt does not have gpgme support)])
], [AC_MSG_WARN(gpg support disabled)])
-AC_CHECK_LIB(slapt,slapt_strerror, [], [AC_MSG_ERROR(libslapt 0.9.12d or greater is required)])
+AC_CHECK_LIB(slapt,slapt_priority_to_str, [], [AC_MSG_ERROR(libslapt 0.10.0 or greater is required)])
LIBS="$LIBS -lglib-2.0 -lgthread-2.0"
diff --git a/gslapt.glade b/gslapt.glade
index 6e0dd52..7493108 100644
--- a/gslapt.glade
+++ b/gslapt.glade
@@ -581,15 +581,15 @@
<property name="spacing">6</property>
<child>
- <widget class="GtkButton" id="preferences_remove_source_button">
+ <widget class="GtkButton" id="preferences_add_source_button">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
- <property name="label">gtk-remove</property>
+ <property name="label">gtk-add</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
- <signal name="clicked" handler="preferences_sources_remove" object="window_preferences" last_modification_time="Mon, 15 Nov 2004 04:02:03 GMT"/>
+ <signal name="clicked" handler="preferences_sources_add" object="window_preferences" last_modification_time="Mon, 15 Nov 2004 04:01:52 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
@@ -614,6 +614,24 @@
<property name="fill">False</property>
</packing>
</child>
+
+ <child>
+ <widget class="GtkButton" id="preferences_remove_source_button">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-remove</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <signal name="clicked" handler="preferences_sources_remove" object="window_preferences" last_modification_time="Mon, 15 Nov 2004 04:02:03 GMT"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="padding">0</property>
@@ -635,84 +653,6 @@
<property name="fill">True</property>
</packing>
</child>
-
- <child>
- <widget class="GtkHBox" id="hbox94">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child>
- <widget class="GtkLabel" id="label163">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;span weight=&quot;bold&quot;&gt;SOURCE=&lt;/span&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="new_source_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- <signal name="editing_done" handler="preferences_sources_add" object="window_preferences" last_modification_time="Wed, 08 Jun 2005 18:21:48 GMT"/>
- <signal name="activate" handler="preferences_sources_add" object="window_preferences" last_modification_time="Wed, 08 Jun 2005 18:21:54 GMT"/>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="preferences_add_source_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-add</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <signal name="clicked" handler="preferences_sources_add" object="window_preferences" last_modification_time="Mon, 15 Nov 2004 04:01:52 GMT"/>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
</widget>
<packing>
<property name="padding">0</property>
@@ -5157,21 +5097,88 @@ http://software.jaos.org/#gslapt&lt;/span&gt;</property>
<property name="type">tab</property>
</packing>
</child>
+ </widget>
+ <packing>
+ <property name="padding">6</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHButtonBox" id="hbuttonbox3">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+ <property name="spacing">0</property>
<child>
- <placeholder/>
+ <widget class="GtkButton" id="button12">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-close</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <signal name="clicked" handler="gtk_widget_destroy" object="changelog_window" last_modification_time="Sat, 08 Mar 2008 22:05:24 GMT"/>
+ </widget>
</child>
+ </widget>
+ <packing>
+ <property name="padding">6</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+<widget class="GtkWindow" id="source_window">
+ <property name="border_width">6</property>
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Package Source</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_CENTER</property>
+ <property name="modal">True</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="icon">gslapt.png</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="urgency_hint">False</property>
+
+ <child>
+ <widget class="GtkVBox" id="vbox79">
+ <property name="border_width">6</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkTable" id="table6">
+ <property name="border_width">6</property>
+ <property name="visible">True</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">2</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
<child>
- <widget class="GtkLabel" id="label297">
+ <widget class="GtkLabel" id="priority_label">
<property name="visible">True</property>
- <property name="label" translatable="yes"></property>
+ <property name="label" translatable="yes">&lt;b&gt;Priority:&lt;/b&gt;</property>
<property name="use_underline">False</property>
- <property name="use_markup">False</property>
+ <property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
- <property name="xalign">0.5</property>
+ <property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
@@ -5181,7 +5188,84 @@ http://software.jaos.org/#gslapt&lt;/span&gt;</property>
<property name="angle">0</property>
</widget>
<packing>
- <property name="type">tab</property>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_padding">6</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="source_label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">&lt;b&gt;Source:&lt;/b&gt;</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_padding">6</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="source_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">●</property>
+ <property name="activates_default">False</property>
+ <property name="width_chars">60</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="y_options">expand</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkComboBoxEntry" id="source_priority">
+ <property name="border_width">6</property>
+ <property name="visible">True</property>
+ <property name="items" translatable="yes">Default
+Preferred
+Official
+Custom</property>
+ <property name="add_tearoffs">False</property>
+ <property name="has_frame">True</property>
+ <property name="focus_on_click">True</property>
+ </widget>
+ <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>
</widget>
@@ -5193,26 +5277,39 @@ http://software.jaos.org/#gslapt&lt;/span&gt;</property>
</child>
<child>
- <widget class="GtkHButtonBox" id="hbuttonbox3">
+ <widget class="GtkHButtonBox" id="hbuttonbox4">
<property name="visible">True</property>
<property name="layout_style">GTK_BUTTONBOX_END</property>
<property name="spacing">0</property>
<child>
- <widget class="GtkButton" id="button12">
+ <widget class="GtkButton" id="button13">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
- <property name="label">gtk-close</property>
+ <property name="label">gtk-cancel</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
- <signal name="clicked" handler="gtk_widget_destroy" object="changelog_window" last_modification_time="Sat, 08 Mar 2008 22:05:24 GMT"/>
+ <signal name="clicked" handler="cancel_source_edit" object="source_window" last_modification_time="Fri, 28 Nov 2008 03:15:46 GMT"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="button14">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-ok</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <signal name="clicked" handler="source_edit_ok" object="source_window" last_modification_time="Fri, 28 Nov 2008 03:16:30 GMT"/>
</widget>
</child>
</widget>
<packing>
- <property name="padding">6</property>
+ <property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
diff --git a/po/bg.po b/po/bg.po
index fb8733f..2d005b7 100644
--- a/po/bg.po
+++ b/po/bg.po
@@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: 0.4.0\n"
+"Project-Id-Version: 0.5.0\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-02-26 22:25-0500\n"
-"PO-Revision-Date: 2008-03-08 21:06+0500\n"
+"PO-Revision-Date: 2008-11-28 01:29+0500\n"
"Last-Translator: Victor Keranov <victor_keranov@mail.bg>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -511,3 +511,27 @@ msgstr "View ChangeLogs"
msgid "ChangeLogs"
msgstr "ChangeLogs"
+msgid "Priority"
+msgstr "Priority"
+
+msgid "Package Source"
+msgstr "Package Source"
+
+msgid "<b>Priority:</b>"
+msgstr "<b>Priority:</b>"
+
+msgid "<b>Source</b>"
+msgstr "<b>Source</b>"
+
+msgid "Default"
+msgstr "Default"
+
+msgid "Preferred"
+msgstr "Preferred"
+
+msgid "Official"
+msgstr "Official"
+
+msgid "Custom"
+msgstr "Custom"
+
diff --git a/po/de.po b/po/de.po
index 3956d9b..27d3e18 100644
--- a/po/de.po
+++ b/po/de.po
@@ -6,10 +6,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: 0.4.0\n"
+"Project-Id-Version: 0.5.0\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-02-26 22:25-0500\n"
-"PO-Revision-Date: 2008-03-08 21:06+0500\n"
+"PO-Revision-Date: 2008-11-28 01:29+0500\n"
"Last-Translator: Manfred Mueller <mmueller@live-modules.org>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -515,3 +515,28 @@ msgstr "ChangeLogs"
msgid "No changelogs found."
msgstr "Keine ChangeLogs gefunden."
+
+msgid "Priority"
+msgstr "Priority"
+
+msgid "Package Source"
+msgstr "Package Source"
+
+msgid "<b>Priority:</b>"
+msgstr "<b>Priority:</b>"
+
+msgid "<b>Source</b>"
+msgstr "<b>Source</b>"
+
+msgid "Default"
+msgstr "Default"
+
+msgid "Preferred"
+msgstr "Preferred"
+
+msgid "Official"
+msgstr "Official"
+
+msgid "Custom"
+msgstr "Custom"
+
diff --git a/po/en.po b/po/en.po
index 30da224..2f67e0b 100644
--- a/po/en.po
+++ b/po/en.po
@@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: 0.4.0\n"
+"Project-Id-Version: 0.5.0\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-02-20 16:24-0500\n"
-"PO-Revision-Date: 2008-03-08 21:06+0500\n"
+"PO-Revision-Date: 2008-11-28 01:29+0500\n"
"Last-Translator: Jason Woodward <woodwardj@jaos.org>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -512,3 +512,27 @@ msgstr "View ChangeLogs"
msgid "ChangeLogs"
msgstr "ChangeLogs"
+msgid "Priority"
+msgstr "Priority"
+
+msgid "Package Source"
+msgstr "Package Source"
+
+msgid "<b>Priority:</b>"
+msgstr "<b>Priority:</b>"
+
+msgid "<b>Source</b>"
+msgstr "<b>Source</b>"
+
+msgid "Default"
+msgstr "Default"
+
+msgid "Preferred"
+msgstr "Preferred"
+
+msgid "Official"
+msgstr "Official"
+
+msgid "Custom"
+msgstr "Custom"
+
diff --git a/po/es.po b/po/es.po
index 92a1d10..52ecd8c 100644
--- a/po/es.po
+++ b/po/es.po
@@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: 0.4.0\n"
+"Project-Id-Version: 0.5.0\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-02-26 22:25-0500\n"
-"PO-Revision-Date: 2008-03-09 17:52+0100\n"
+"PO-Revision-Date: 2008-11-28 01:29+0500\n"
"Last-Translator: Manuel Barallobre (BARA) <bara666@gmail.com>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -508,3 +508,27 @@ msgstr "Ver ChangeLogs"
msgid "ChangeLogs"
msgstr "ChangeLogs"
+msgid "Priority"
+msgstr "Priority"
+
+msgid "Package Source"
+msgstr "Package Source"
+
+msgid "<b>Priority:</b>"
+msgstr "<b>Priority:</b>"
+
+msgid "<b>Source</b>"
+msgstr "<b>Source</b>"
+
+msgid "Default"
+msgstr "Default"
+
+msgid "Preferred"
+msgstr "Preferred"
+
+msgid "Official"
+msgstr "Official"
+
+msgid "Custom"
+msgstr "Custom"
+
diff --git a/po/fr.po b/po/fr.po
index 6d0173a..ad5c620 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: 0.4.0\n"
+"Project-Id-Version: 0.5.0\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-02-26 22:25-0500\n"
-"PO-Revision-Date: 2008-03-08 21:06+0500\n"
+"PO-Revision-Date: 2008-11-28 01:29+0500\n"
"Last-Translator: Natim <natim@trunat.fr>\n"
"Language-Team: <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -511,3 +511,27 @@ msgstr "View ChangeLogs"
msgid "ChangeLogs"
msgstr "ChangeLogs"
+msgid "Priority"
+msgstr "Priority"
+
+msgid "Package Source"
+msgstr "Package Source"
+
+msgid "<b>Priority:</b>"
+msgstr "<b>Priority:</b>"
+
+msgid "<b>Source</b>"
+msgstr "<b>Source</b>"
+
+msgid "Default"
+msgstr "Default"
+
+msgid "Preferred"
+msgstr "Preferred"
+
+msgid "Official"
+msgstr "Official"
+
+msgid "Custom"
+msgstr "Custom"
+
diff --git a/po/gl_ES.po b/po/gl_ES.po
index 8a59baf..817ab6a 100644
--- a/po/gl_ES.po
+++ b/po/gl_ES.po
@@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: 0.4.0\n"
+"Project-Id-Version: 0.5.0\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-02-26 22:25-0500\n"
-"PO-Revision-Date: 2008-03-09 17:55+0100\n"
+"PO-Revision-Date: 2008-11-28 01:29+0500\n"
"Last-Translator: Manuel Barallobre (BARA) <bara666@gmail.com>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -508,3 +508,27 @@ msgstr "Ver ChangeLogs"
msgid "ChangeLogs"
msgstr "ChangeLogs"
+msgid "Priority"
+msgstr "Priority"
+
+msgid "Package Source"
+msgstr "Package Source"
+
+msgid "<b>Priority:</b>"
+msgstr "<b>Priority:</b>"
+
+msgid "<b>Source</b>"
+msgstr "<b>Source</b>"
+
+msgid "Default"
+msgstr "Default"
+
+msgid "Preferred"
+msgstr "Preferred"
+
+msgid "Official"
+msgstr "Official"
+
+msgid "Custom"
+msgstr "Custom"
+
diff --git a/po/gslapt.pot b/po/gslapt.pot
index 6b150c6..8dfb155 100644
--- a/po/gslapt.pot
+++ b/po/gslapt.pot
@@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: 0.4.0a\n"
+"Project-Id-Version: 0.5.0\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-02-26 22:25-0500\n"
-"PO-Revision-Date: 2008-05-26 12:58+0500\n"
+"PO-Revision-Date: 2008-11-28 01:29+0500\n"
"Last-Translator: Jason Woodward <woodwardj@jaos.org>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -513,3 +513,27 @@ msgstr ""
msgid "No changelogs found."
msgstr ""
+msgid "Priority"
+msgstr ""
+
+msgid "Package Source"
+msgstr ""
+
+msgid "<b>Priority:</b>"
+msgstr ""
+
+msgid "<b>Source</b>"
+msgstr ""
+
+msgid "Default"
+msgstr ""
+
+msgid "Preferred"
+msgstr ""
+
+msgid "Official"
+msgstr ""
+
+msgid "Custom"
+msgstr ""
+
diff --git a/po/id.po b/po/id.po
index 93ce8cc..884c6a0 100644
--- a/po/id.po
+++ b/po/id.po
@@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: 0.4.0\n"
+"Project-Id-Version: 0.5.0\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-02-26 22:25-0500\n"
-"PO-Revision-Date: 2008-03-08 21:06+0500\n"
+"PO-Revision-Date: 2008-11-28 01:29+0500\n"
"Last-Translator: Kemas Antonius <kyantonius@kyantonius.com>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -511,3 +511,27 @@ msgstr "View ChangeLogs"
msgid "ChangeLogs"
msgstr "ChangeLogs"
+msgid "Priority"
+msgstr "Priority"
+
+msgid "Package Source"
+msgstr "Package Source"
+
+msgid "<b>Priority:</b>"
+msgstr "<b>Priority:</b>"
+
+msgid "<b>Source</b>"
+msgstr "<b>Source</b>"
+
+msgid "Default"
+msgstr "Default"
+
+msgid "Preferred"
+msgstr "Preferred"
+
+msgid "Official"
+msgstr "Official"
+
+msgid "Custom"
+msgstr "Custom"
+
diff --git a/po/it.po b/po/it.po
index 9b96341..916f8d3 100644
--- a/po/it.po
+++ b/po/it.po
@@ -6,10 +6,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: 0.4.0\n"
+"Project-Id-Version: 0.5.0\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-07-28 18:01+0000\n"
-"PO-Revision-Date: 2008-03-08 21:06+0500\n"
+"PO-Revision-Date: 2008-11-28 01:29+0500\n"
"Last-Translator: Fabio Varesano <fvaresano@yahoo.it>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -512,3 +512,27 @@ msgstr "View ChangeLogs"
msgid "ChangeLogs"
msgstr "ChangeLogs"
+msgid "Priority"
+msgstr "Priority"
+
+msgid "Package Source"
+msgstr "Package Source"
+
+msgid "<b>Priority:</b>"
+msgstr "<b>Priority:</b>"
+
+msgid "<b>Source</b>"
+msgstr "<b>Source</b>"
+
+msgid "Default"
+msgstr "Default"
+
+msgid "Preferred"
+msgstr "Preferred"
+
+msgid "Official"
+msgstr "Official"
+
+msgid "Custom"
+msgstr "Custom"
+
diff --git a/po/ja.po b/po/ja.po
index c39ba6b..0e4c7c8 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -6,10 +6,10 @@
# JW <J_W@somewhere.c0.jp>, 2006.
msgid ""
msgstr ""
-"Project-Id-Version: 0.4.0\n"
+"Project-Id-Version: 0.5.0\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2006-03-07 20:26+0900\n"
-"PO-Revision-Date: 2008-03-08 21:06+0500\n"
+"PO-Revision-Date: 2008-11-28 01:29+0500\n"
"Last-Translator: JW <J_W@somewhere.c0.jp>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -520,3 +520,27 @@ msgstr "View ChangeLogs"
msgid "ChangeLogs"
msgstr "ChangeLogs"
+msgid "Priority"
+msgstr "Priority"
+
+msgid "Package Source"
+msgstr "Package Source"
+
+msgid "<b>Priority:</b>"
+msgstr "<b>Priority:</b>"
+
+msgid "<b>Source</b>"
+msgstr "<b>Source</b>"
+
+msgid "Default"
+msgstr "Default"
+
+msgid "Preferred"
+msgstr "Preferred"
+
+msgid "Official"
+msgstr "Official"
+
+msgid "Custom"
+msgstr "Custom"
+
diff --git a/po/nl.po b/po/nl.po
index e63a62c..8dbacaa 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -6,10 +6,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: 0.4.0\n"
+"Project-Id-Version: 0.5.0\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-08-18 23:06+0200\n"
-"PO-Revision-Date: 2008-03-08 21:06+0500\n"
+"PO-Revision-Date: 2008-11-28 01:29+0500\n"
"Last-Translator: Martijn Dekker <martijn@inlv.demon.nl>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -513,3 +513,27 @@ msgstr "View ChangeLogs"
msgid "ChangeLogs"
msgstr "ChangeLogs"
+msgid "Priority"
+msgstr "Priority"
+
+msgid "Package Source"
+msgstr "Package Source"
+
+msgid "<b>Priority:</b>"
+msgstr "<b>Priority:</b>"
+
+msgid "<b>Source</b>"
+msgstr "<b>Source</b>"
+
+msgid "Default"
+msgstr "Default"
+
+msgid "Preferred"
+msgstr "Preferred"
+
+msgid "Official"
+msgstr "Official"
+
+msgid "Custom"
+msgstr "Custom"
+
diff --git a/po/pl.po b/po/pl.po
index 4c578a3..d4d6834 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: 0.4.0\n"
+"Project-Id-Version: 0.5.0\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-02-17 14:52-0500\n"
-"PO-Revision-Date: 2008-03-08 21:06+0500\n"
+"PO-Revision-Date: 2008-11-28 01:29+0500\n"
"Last-Translator: Piotr Simon <sajmon@tenboard.com>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -512,3 +512,27 @@ msgstr "View ChangeLogs"
msgid "ChangeLogs"
msgstr "ChangeLogs"
+msgid "Priority"
+msgstr "Priority"
+
+msgid "Package Source"
+msgstr "Package Source"
+
+msgid "<b>Priority:</b>"
+msgstr "<b>Priority:</b>"
+
+msgid "<b>Source</b>"
+msgstr "<b>Source</b>"
+
+msgid "Default"
+msgstr "Default"
+
+msgid "Preferred"
+msgstr "Preferred"
+
+msgid "Official"
+msgstr "Official"
+
+msgid "Custom"
+msgstr "Custom"
+
diff --git a/po/pt.po b/po/pt.po
index a9e898c..ed2182d 100644
--- a/po/pt.po
+++ b/po/pt.po
@@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: 0.4.0\n"
+"Project-Id-Version: 0.5.0\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-05-06 11:10-0500\n"
-"PO-Revision-Date: 2008-03-08 21:06+0500\n"
+"PO-Revision-Date: 2008-11-28 01:29+0500\n"
"Last-Translator: Pedro Pinto aka _PN_boy <pedro_nuno_pn@zmail.pt>\n"
"Language-Team: slapt-get devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -508,3 +508,27 @@ msgstr "View ChangeLogs"
msgid "ChangeLogs"
msgstr "ChangeLogs"
+msgid "Priority"
+msgstr "Priority"
+
+msgid "Package Source"
+msgstr "Package Source"
+
+msgid "<b>Priority:</b>"
+msgstr "<b>Priority:</b>"
+
+msgid "<b>Source</b>"
+msgstr "<b>Source</b>"
+
+msgid "Default"
+msgstr "Default"
+
+msgid "Preferred"
+msgstr "Preferred"
+
+msgid "Official"
+msgstr "Official"
+
+msgid "Custom"
+msgstr "Custom"
+
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 168d30f..02ba32d 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: 0.4.0\n"
+"Project-Id-Version: 0.5.0\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-02-26 22:25-0500\n"
-"PO-Revision-Date: 2008-03-08 21:06+0500\n"
+"PO-Revision-Date: 2008-11-28 01:29+0500\n"
"Last-Translator: Frederico Henrique Gonalves Lima <fredhgl@yahoo.com.br>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -512,3 +512,27 @@ msgstr "View ChangeLogs"
msgid "ChangeLogs"
msgstr "ChangeLogs"
+msgid "Priority"
+msgstr "Priority"
+
+msgid "Package Source"
+msgstr "Package Source"
+
+msgid "<b>Priority:</b>"
+msgstr "<b>Priority:</b>"
+
+msgid "<b>Source</b>"
+msgstr "<b>Source</b>"
+
+msgid "Default"
+msgstr "Default"
+
+msgid "Preferred"
+msgstr "Preferred"
+
+msgid "Official"
+msgstr "Official"
+
+msgid "Custom"
+msgstr "Custom"
+
diff --git a/po/ru.po b/po/ru.po
index 792f3a1..577647c 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -6,10 +6,10 @@
msgid ""
msgstr ""
-"Project-Id-Version: 0.4.0\n"
+"Project-Id-Version: 0.5.0\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-09-08 00:54\n"
-"PO-Revision-Date: 2008-03-08 21:06+0500\n"
+"PO-Revision-Date: 2008-11-28 01:29+0500\n"
"Last-Translator: sin <digitalhunger@gmail.com>\n"
"Language-Team: DeepStyle team <deep@deepstyle.org.ua>\n"
"MIME-Version: 1.0\n"
@@ -513,3 +513,27 @@ msgstr "View ChangeLogs"
msgid "ChangeLogs"
msgstr "ChangeLogs"
+msgid "Priority"
+msgstr "Priority"
+
+msgid "Package Source"
+msgstr "Package Source"
+
+msgid "<b>Priority:</b>"
+msgstr "<b>Priority:</b>"
+
+msgid "<b>Source</b>"
+msgstr "<b>Source</b>"
+
+msgid "Default"
+msgstr "Default"
+
+msgid "Preferred"
+msgstr "Preferred"
+
+msgid "Official"
+msgstr "Official"
+
+msgid "Custom"
+msgstr "Custom"
+
diff --git a/po/sk.po b/po/sk.po
index c3d558e..ff7f108 100644
--- a/po/sk.po
+++ b/po/sk.po
@@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: 0.4.0\n"
+"Project-Id-Version: 0.5.0\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-06-23 21:28-0500\n"
-"PO-Revision-Date: 2008-03-08 21:06+0500\n"
+"PO-Revision-Date: 2008-11-28 01:29+0500\n"
"Last-Translator: Erik Gyepes <depi@depi.sk>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -512,3 +512,27 @@ msgstr "View ChangeLogs"
msgid "ChangeLogs"
msgstr "ChangeLogs"
+msgid "Priority"
+msgstr "Priority"
+
+msgid "Package Source"
+msgstr "Package Source"
+
+msgid "<b>Priority:</b>"
+msgstr "<b>Priority:</b>"
+
+msgid "<b>Source</b>"
+msgstr "<b>Source</b>"
+
+msgid "Default"
+msgstr "Default"
+
+msgid "Preferred"
+msgstr "Preferred"
+
+msgid "Official"
+msgstr "Official"
+
+msgid "Custom"
+msgstr "Custom"
+
diff --git a/po/sv.po b/po/sv.po
index 3432be5..31476e2 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: 0.4.0\n"
+"Project-Id-Version: 0.5.0\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-02-26 22:25-0500\n"
-"PO-Revision-Date: 2008-03-08 21:06+0500\n"
+"PO-Revision-Date: 2008-11-28 01:29+0500\n"
"Last-Translator: Hakan Lindqvist <tfy00hlt@cs.umu.se>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -512,3 +512,27 @@ msgstr "View ChangeLogs"
msgid "ChangeLogs"
msgstr "ChangeLogs"
+msgid "Priority"
+msgstr "Priority"
+
+msgid "Package Source"
+msgstr "Package Source"
+
+msgid "<b>Priority:</b>"
+msgstr "<b>Priority:</b>"
+
+msgid "<b>Source</b>"
+msgstr "<b>Source</b>"
+
+msgid "Default"
+msgstr "Default"
+
+msgid "Preferred"
+msgstr "Preferred"
+
+msgid "Official"
+msgstr "Official"
+
+msgid "Custom"
+msgstr "Custom"
+
diff --git a/po/tr.po b/po/tr.po
index cf2a292..0145810 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -4,10 +4,10 @@
# Bekir SONAT <bekirsonat@kde.org.tr>, 2006.
msgid ""
msgstr ""
-"Project-Id-Version: 0.4.0\n"
+"Project-Id-Version: 0.5.0\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-02-26 22:25-0500\n"
-"PO-Revision-Date: 2008-03-08 21:06+0500\n"
+"PO-Revision-Date: 2008-11-28 01:29+0500\n"
"Last-Translator: Bekir SONAT <bekirsonat@kde.org.tr>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -512,3 +512,27 @@ msgstr "View ChangeLogs"
msgid "ChangeLogs"
msgstr "ChangeLogs"
+msgid "Priority"
+msgstr "Priority"
+
+msgid "Package Source"
+msgstr "Package Source"
+
+msgid "<b>Priority:</b>"
+msgstr "<b>Priority:</b>"
+
+msgid "<b>Source</b>"
+msgstr "<b>Source</b>"
+
+msgid "Default"
+msgstr "Default"
+
+msgid "Preferred"
+msgstr "Preferred"
+
+msgid "Official"
+msgstr "Official"
+
+msgid "Custom"
+msgstr "Custom"
+
diff --git a/po/uk.po b/po/uk.po
index 4a97a0e..90e4389 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -6,10 +6,10 @@
msgid ""
msgstr ""
-"Project-Id-Version: 0.4.0\n"
+"Project-Id-Version: 0.5.0\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-09-08 00:54\n"
-"PO-Revision-Date: 2008-03-08 21:06+0500\n"
+"PO-Revision-Date: 2008-11-28 01:29+0500\n"
"Last-Translator: sin <digitalhunger@gmail.com>\n"
"Language-Team: DeepStyle team <deep@deepstyle.org.ua>\n"
"MIME-Version: 1.0\n"
@@ -513,3 +513,27 @@ msgstr "View ChangeLogs"
msgid "ChangeLogs"
msgstr "ChangeLogs"
+msgid "Priority"
+msgstr "Priority"
+
+msgid "Package Source"
+msgstr "Package Source"
+
+msgid "<b>Priority:</b>"
+msgstr "<b>Priority:</b>"
+
+msgid "<b>Source</b>"
+msgstr "<b>Source</b>"
+
+msgid "Default"
+msgstr "Default"
+
+msgid "Preferred"
+msgstr "Preferred"
+
+msgid "Official"
+msgstr "Official"
+
+msgid "Custom"
+msgstr "Custom"
+
diff --git a/po/vi.po b/po/vi.po
index df9de8e..9291fb9 100644
--- a/po/vi.po
+++ b/po/vi.po
@@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: 0.4.0\n"
+"Project-Id-Version: 0.5.0\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-02-26 22:25-0500\n"
-"PO-Revision-Date: 2008-03-08 21:06+0500\n"
+"PO-Revision-Date: 2008-11-28 01:29+0500\n"
"Last-Translator: Nguyễn Văn Vũ <vncasper@yahoo.com>\n"
"Language-Team: gnome-vi <gnomevi-list@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
@@ -512,3 +512,27 @@ msgstr "View ChangeLogs"
msgid "ChangeLogs"
msgstr "ChangeLogs"
+msgid "Priority"
+msgstr "Priority"
+
+msgid "Package Source"
+msgstr "Package Source"
+
+msgid "<b>Priority:</b>"
+msgstr "<b>Priority:</b>"
+
+msgid "<b>Source</b>"
+msgstr "<b>Source</b>"
+
+msgid "Default"
+msgstr "Default"
+
+msgid "Preferred"
+msgstr "Preferred"
+
+msgid "Official"
+msgstr "Official"
+
+msgid "Custom"
+msgstr "Custom"
+
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 0a849d2..1354b4d 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: 0.4.0\n"
+"Project-Id-Version: 0.5.0\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-02-26 22:25-0500\n"
-"PO-Revision-Date: 2008-03-08 21:06+0500\n"
+"PO-Revision-Date: 2008-11-28 01:29+0500\n"
"Last-Translator: Yang Jinsong <shannleon@gmail.com>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -513,3 +513,27 @@ msgstr "View ChangeLogs"
msgid "ChangeLogs"
msgstr "ChangeLogs"
+msgid "Priority"
+msgstr "Priority"
+
+msgid "Package Source"
+msgstr "Package Source"
+
+msgid "<b>Priority:</b>"
+msgstr "<b>Priority:</b>"
+
+msgid "<b>Source</b>"
+msgstr "<b>Source</b>"
+
+msgid "Default"
+msgstr "Default"
+
+msgid "Preferred"
+msgstr "Preferred"
+
+msgid "Official"
+msgstr "Official"
+
+msgid "Custom"
+msgstr "Custom"
+
diff --git a/src/callbacks.c b/src/callbacks.c
index 489b906..f2ef0eb 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -34,10 +34,10 @@ extern struct slapt_pkg_list *all;
extern struct slapt_pkg_list *installed;
extern slapt_transaction_t *trans;
extern char rc_location[];
-extern struct slapt_source_list *disabled_sources;
static GtkWidget *progress_window;
+static GtkWidget *preferences_window;
G_LOCK_DEFINE_STATIC (_cancelled);
static volatile guint _cancelled = 0;
static gboolean sources_modified = FALSE;
@@ -67,7 +67,6 @@ static void build_exclude_treeviewlist (GtkWidget *treeview);
static int populate_transaction_window (GtkWidget *trans_window);
char *download_packages (void);
static gboolean install_packages (void);
-static gboolean write_preferences (void);
static void set_execute_active (void);
static void clear_execute_active (void);
static void notify (const char *title,const char *message);
@@ -93,6 +92,8 @@ static int set_iter_for_remove(GtkTreeModel *model, GtkTreeIter *iter,
static void set_busy_cursor (void);
static void unset_busy_cursor (void);
+static SLAPT_PRIORITY_T convert_gslapt_priority_to_slapt_priority(gint p);
+static gint convert_slapt_priority_to_gslapt_priority(SLAPT_PRIORITY_T p);
void on_gslapt_destroy (GtkObject *object, gpointer user_data)
{
@@ -101,7 +102,6 @@ void on_gslapt_destroy (GtkObject *object, gpointer user_data)
slapt_free_pkg_list(all);
slapt_free_pkg_list(installed);
slapt_free_rc_config(global_config);
- slapt_free_source_list(disabled_sources);
gtk_main_quit();
exit(0);
@@ -172,6 +172,7 @@ void open_preferences (GtkMenuItem *menuitem, gpointer user_data)
build_exclude_treeviewlist((GtkWidget *)exclude_tree);
gtk_widget_show(preferences);
+ preferences_window = preferences;
}
void search_activated (GtkWidget *gslapt, gpointer user_data)
@@ -1013,6 +1014,9 @@ static void get_package_data (void)
#endif
unsigned int compressed = 0;
+ if (global_config->sources->src[i]->disabled == SLAPT_TRUE)
+ continue;
+
if (_cancelled == 1) {
G_LOCK(_cancelled);
_cancelled = 0;
@@ -1027,14 +1031,14 @@ static void get_package_data (void)
gdk_threads_enter();
gtk_progress_bar_set_fraction(dl_bar,0.0);
- gtk_label_set_text(progress_message_label,global_config->sources->url[i]);
+ gtk_label_set_text(progress_message_label,global_config->sources->src[i]->url);
gtk_label_set_text(progress_action_label,(gchar *)_("Retrieving package data..."));
gdk_threads_leave();
/* download our SLAPT_PKG_LIST */
available_pkgs =
slapt_get_pkg_source_packages(global_config,
- global_config->sources->url[i],
+ global_config->sources->src[i]->url,
&compressed);
/* make sure we found a package listing */
@@ -1055,17 +1059,16 @@ static void get_package_data (void)
GtkWidget *q = create_source_failed_dialog();
gtk_label_set_text(
GTK_LABEL(lookup_widget(q,"failed_source_label")),
- global_config->sources->url[i]
+ global_config->sources->src[i]->url
);
gint result = gtk_dialog_run(GTK_DIALOG(q));
if (result == GTK_RESPONSE_YES) {
/* we'll disable this source and continue on */
/* this is only disabled for the current session since
- write_preferences() is not called */
+ slapt_write_rc_config() is not called */
continue_anyway = TRUE;
- slapt_add_source(disabled_sources,global_config->sources->url[i]);
- slapt_remove_source(global_config->sources,global_config->sources->url[i]);
+ global_config->sources->src[i]->disabled = SLAPT_TRUE;
} else {
gtk_widget_destroy(progress_window);
unlock_toolbar_buttons();
@@ -1107,7 +1110,7 @@ static void get_package_data (void)
/* download SLAPT_PATCHES_LIST */
patch_pkgs =
slapt_get_pkg_source_patches(global_config,
- global_config->sources->url[i],
+ global_config->sources->src[i]->url,
&compressed);
@@ -1135,7 +1138,7 @@ static void get_package_data (void)
/* download checksum file */
tmp_checksum_f =
slapt_get_pkg_source_checksums(global_config,
- global_config->sources->url[i],
+ global_config->sources->src[i]->url,
&compressed);
if (tmp_checksum_f == NULL) {
@@ -1148,7 +1151,7 @@ static void get_package_data (void)
_cancelled = 0;
G_UNLOCK(_cancelled);
} else {
- notify((gchar *)_("Source download failed"),global_config->sources->url[i]);
+ notify((gchar *)_("Source download failed"),global_config->sources->src[i]->url);
}
gdk_threads_leave();
return;
@@ -1164,7 +1167,7 @@ static void get_package_data (void)
gdk_threads_leave();
tmp_signature_f = slapt_get_pkg_source_checksums_signature (global_config,
- global_config->sources->url[i],
+ global_config->sources->src[i]->url,
&compressed);
if (tmp_signature_f == NULL) {
@@ -1184,7 +1187,7 @@ static void get_package_data (void)
/* if we downloaded the compressed checksums, open it raw (w/o gunzippign) */
if (compressed == 1) {
- char *filename = slapt_gen_filename_from_url(global_config->sources->url[i],
+ char *filename = slapt_gen_filename_from_url(global_config->sources->src[i]->url,
SLAPT_CHECKSUM_FILE_GZ);
tmp_checksum_to_verify_f = slapt_open_file(filename,"r");
free(filename);
@@ -1207,7 +1210,7 @@ static void get_package_data (void)
gslapt_clear_status(context_id);
gtk_widget_destroy(progress_window);
unlock_toolbar_buttons();
- notify((gchar *)_("GPG Key verification failed"),global_config->sources->url[i]);
+ notify((gchar *)_("GPG Key verification failed"),global_config->sources->src[i]->url);
gdk_threads_leave();
return;
}
@@ -1233,7 +1236,7 @@ static void get_package_data (void)
gdk_threads_leave();
slapt_get_pkg_source_changelog(global_config,
- global_config->sources->url[i],
+ global_config->sources->src[i]->url,
&compressed);
@@ -1255,7 +1258,7 @@ static void get_package_data (void)
/* honor the mirror if it was set in the PACKAGES.TXT */
if (available_pkgs->pkgs[pkg_i]->mirror == NULL ||
strlen(available_pkgs->pkgs[pkg_i]->mirror) == 0) {
- available_pkgs->pkgs[pkg_i]->mirror = strdup(global_config->sources->url[i]);
+ available_pkgs->pkgs[pkg_i]->mirror = strdup(global_config->sources->src[i]->url);
}
slapt_add_pkg_to_pkg_list(new_pkgs,available_pkgs->pkgs[pkg_i]);
}
@@ -1277,7 +1280,7 @@ static void get_package_data (void)
/* honor the mirror if it was set in the PACKAGES.TXT */
if (patch_pkgs->pkgs[pkg_i]->mirror == NULL ||
strlen(patch_pkgs->pkgs[pkg_i]->mirror) == 0) {
- patch_pkgs->pkgs[pkg_i]->mirror = strdup(global_config->sources->url[i]);
+ patch_pkgs->pkgs[pkg_i]->mirror = strdup(global_config->sources->src[i]->url);
}
slapt_add_pkg_to_pkg_list(new_pkgs,patch_pkgs->pkgs[pkg_i]);
}
@@ -1556,44 +1559,46 @@ 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");
+ gboolean enabled = TRUE;
store = gtk_list_store_new (
- 3,
- GDK_TYPE_PIXBUF,G_TYPE_STRING,G_TYPE_BOOLEAN
+ 5,
+ GDK_TYPE_PIXBUF,G_TYPE_STRING,G_TYPE_BOOLEAN,G_TYPE_STRING,G_TYPE_UINT
);
for (i = 0; i < global_config->sources->count; ++i) {
- GdkPixbuf *status_icon = NULL;
+ GdkPixbuf *status_icon;
+ const char *priority_str;
- if ( global_config->sources->url[i] == NULL )
+ if ( global_config->sources->src[i]->url == NULL )
continue;
- status_icon = create_pixbuf("pkg_action_installed.png");
-
- gtk_list_store_append(store, &iter);
- gtk_list_store_set(store,&iter,
- 0,status_icon,
- 1,global_config->sources->url[i],
- 2,TRUE,
- -1);
-
- gdk_pixbuf_unref(status_icon);
- }
+ if (global_config->sources->src[i]->disabled == SLAPT_TRUE) {
+ enabled = FALSE;
+ status_icon = disabled_status_icon;
+ } else {
+ enabled = TRUE;
+ status_icon = enabled_status_icon;
+ }
- /* show disabled sources here */
- for (i = 0; i < disabled_sources->count; ++i) {
- GdkPixbuf *status_icon = create_pixbuf("pkg_action_available.png");
+ priority_str = slapt_priority_to_str(global_config->sources->src[i]->priority);
gtk_list_store_append(store, &iter);
gtk_list_store_set(store,&iter,
0,status_icon,
- 1,disabled_sources->url[i],
- 2,FALSE,
+ 1,global_config->sources->src[i]->url,
+ 2,enabled,
+ 3,priority_str,
+ 4,global_config->sources->src[i]->priority,
-1);
- gdk_pixbuf_unref(status_icon);
}
+ gdk_pixbuf_unref(enabled_status_icon);
+ gdk_pixbuf_unref(disabled_status_icon);
+
/* column for enabled status */
renderer = gtk_cell_renderer_pixbuf_new();
column = gtk_tree_view_column_new_with_attributes ((gchar *)_("Enabled"), renderer,
@@ -1613,6 +1618,12 @@ static void build_sources_treeviewlist(GtkWidget *treeview)
gtk_tree_view_append_column (GTK_TREE_VIEW(treeview), column);
gtk_tree_view_column_set_visible(column,FALSE);
+ /* priority column */
+ renderer = gtk_cell_renderer_text_new();
+ column = gtk_tree_view_column_new_with_attributes((gchar *)_("Priority"),renderer,
+ "text",3,NULL);
+ gtk_tree_view_append_column (GTK_TREE_VIEW(treeview), column);
+
gtk_tree_view_set_model (GTK_TREE_VIEW(treeview),GTK_TREE_MODEL(store));
select = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
@@ -2196,24 +2207,10 @@ void clean_callback (GtkWidget *widget, gpointer user_data)
void preferences_sources_add (GtkWidget *w, gpointer user_data)
{
- GtkTreeIter iter;
- GtkTreeView *source_tree = GTK_TREE_VIEW(lookup_widget(w,"preferences_sources_treeview"));
- GtkEntry *new_source_entry = GTK_ENTRY(lookup_widget(w,"new_source_entry"));
- const gchar *new_source = gtk_entry_get_text(new_source_entry);
- GtkListStore *store;
-
- if ( new_source == NULL || strlen(new_source) < 1 )
- return;
-
- store = GTK_LIST_STORE(gtk_tree_view_get_model(source_tree));
-
- gtk_list_store_append(store, &iter);
- gtk_list_store_set(store, &iter, 1, new_source, 2, TRUE, -1);
-
- gtk_entry_set_text(new_source_entry,"");
-
- sources_modified = TRUE;
-
+ 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);
}
void preferences_sources_remove (GtkWidget *w, gpointer user_data)
@@ -2239,76 +2236,26 @@ void preferences_sources_edit (GtkWidget *w, gpointer user_data)
GtkTreeSelection *select = gtk_tree_view_get_selection (GTK_TREE_VIEW (source_tree));
if ( gtk_tree_selection_get_selected(select,&model,&iter)) {
- guint i = 0;
+ guint i = 0, priority;
gchar *source;
- gtk_tree_model_get(model,&iter,1,&source,-1);
+ gtk_tree_model_get(model,&iter,1,&source,4,&priority,-1);
if (source) {
- GtkEntry *source_entry = GTK_ENTRY(lookup_widget(w,"new_source_entry"));
- GtkButton *button = GTK_BUTTON(lookup_widget(w,"preferences_add_source_button"));
+ 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"));
+ g_object_set_data ( G_OBJECT(source_window), "original_url", source);
gtk_entry_set_text(source_entry,source);
-
- gtk_button_set_label(button, "gtk-save");
- gtk_button_set_use_stock(button, TRUE);
- g_signal_handlers_disconnect_by_func(GTK_OBJECT(button),preferences_sources_add,GTK_OBJECT(w));
- g_signal_connect_swapped ((gpointer) button, "clicked",
- G_CALLBACK (preferences_sources_modify),
- GTK_OBJECT (w));
+ gtk_combo_box_set_active (source_priority,convert_slapt_priority_to_gslapt_priority(priority));
+ gtk_widget_show(source_window);
}
}
}
-void preferences_sources_modify (GtkWidget *w, gpointer user_data)
-{
- GtkTreeIter iter;
- GtkTreeModel *model;
- GtkTreeView *source_tree = GTK_TREE_VIEW(lookup_widget(w,"preferences_sources_treeview"));
- GtkTreeSelection *select = gtk_tree_view_get_selection (GTK_TREE_VIEW (source_tree));
- GtkEntry *source_entry = GTK_ENTRY(lookup_widget(w,"new_source_entry"));
- GtkButton *button = GTK_BUTTON(lookup_widget(w,"preferences_add_source_button"));
- GtkListStore *store;
-
- if ( gtk_tree_selection_get_selected(select,&model,&iter)) {
- guint i = 0;
- gchar *source;
- const gchar *modified_source_c = gtk_entry_get_text(source_entry);
-
- gtk_tree_model_get(model,&iter,1,&source,-1);
-
- if ( source && modified_source_c != NULL && strlen(modified_source_c) > 1) {
- const gchar *modified_source_c = gtk_entry_get_text(source_entry);
- gchar *modified_source = g_strdup(modified_source_c);
-
- store = GTK_LIST_STORE(gtk_tree_view_get_model(source_tree));
- gtk_list_store_set(store, &iter, 1, modified_source, -1);
-
- for(i = 0; i < global_config->sources->count; ++i)
- {
- if (strcmp( global_config->sources->url[i], (const char *)source) == 0)
- {
- char *tmp = global_config->sources->url[i];
- global_config->sources->url[i] = modified_source;
- free(tmp);
- sources_modified = TRUE;
- }
- }
-
- }
- }
-
- gtk_entry_set_text(source_entry,"");
- gtk_button_set_label(button, "gtk-add");
- gtk_button_set_use_stock(button, TRUE);
- g_signal_handlers_disconnect_by_func(GTK_OBJECT(button),preferences_sources_modify,GTK_OBJECT(w));
- g_signal_connect_swapped ((gpointer) button, "clicked",
- G_CALLBACK (preferences_sources_add),
- GTK_OBJECT (w));
-}
-
void preferences_on_ok_clicked (GtkWidget *w, gpointer user_data)
{
GtkEntry *preferences_working_dir_entry = GTK_ENTRY(lookup_widget(w,"preferences_working_dir_entry"));
@@ -2333,9 +2280,6 @@ void preferences_on_ok_clicked (GtkWidget *w, gpointer user_data)
global_config->exclude_list = slapt_init_exclude_list();
global_config->sources = slapt_init_source_list();
- slapt_free_source_list(disabled_sources);
- disabled_sources = slapt_init_source_list();
-
tree = GTK_TREE_VIEW(lookup_widget(w,"preferences_sources_treeview"));
model = gtk_tree_view_get_model(tree);
valid = gtk_tree_model_get_iter_first(model,&iter);
@@ -2343,14 +2287,24 @@ void preferences_on_ok_clicked (GtkWidget *w, gpointer user_data)
{
gchar *source = NULL;
gboolean status;
- gtk_tree_model_get(model, &iter, 1, &source, 2, &status, -1);
+ SLAPT_PRIORITY_T priority;
+ gtk_tree_model_get(model, &iter, 1, &source, 2, &status, 4, &priority, -1);
+
+ if (source != NULL) {
+ slapt_source_t *src = slapt_init_source(source);
+ if (src != NULL) {
- if (status)
- slapt_add_source(global_config->sources,source);
- else
- slapt_add_source(disabled_sources,source);
+ if (status)
+ src->disabled = SLAPT_FALSE;
+ else
+ src->disabled = SLAPT_TRUE;
- g_free(source);
+ src->priority = priority;
+
+ slapt_add_source(global_config->sources,src);
+ }
+ g_free(source);
+ }
valid = gtk_tree_model_iter_next(model, &iter);
}
@@ -2369,11 +2323,12 @@ void preferences_on_ok_clicked (GtkWidget *w, gpointer user_data)
valid = gtk_tree_model_iter_next(model, &iter);
}
- if ( write_preferences() == FALSE ) {
+ if ( slapt_write_rc_config(global_config, rc_location) != 0) {
notify((gchar *)_("Error"),(gchar *)_("Failed to commit preferences"));
on_gslapt_destroy(NULL,NULL);
}
+ preferences_window = NULL;
gtk_widget_destroy(w);
/* dialog to resync package sources */
@@ -2426,43 +2381,10 @@ void preferences_exclude_remove(GtkWidget *w, gpointer user_data)
}
-static gboolean write_preferences (void)
-{
- guint i;
- FILE *rc;
-
- rc = slapt_open_file(rc_location,"w+");
- if ( rc == NULL )
- return FALSE;
-
- fprintf(rc,"%s%s\n",WORKINGDIR_TOKEN,global_config->working_dir);
-
- fprintf(rc,"%s",EXCLUDE_TOKEN);
- for (i = 0;i < global_config->exclude_list->count;++i) {
- if ( i+1 == global_config->exclude_list->count) {
- fprintf(rc,"%s",global_config->exclude_list->excludes[i]);
- }else{
- fprintf(rc,"%s,",global_config->exclude_list->excludes[i]);
- }
- }
- fprintf(rc,"\n");
-
- for (i = 0; i < global_config->sources->count;++i) {
- fprintf(rc,"%s%s\n",SOURCE_TOKEN,global_config->sources->url[i]);
- }
-
- for (i = 0; i < disabled_sources->count; ++i) {
- fprintf(rc,"#DISABLED=%s\n",disabled_sources->url[i]);
- }
-
- fclose(rc);
-
- return TRUE;
-}
-
void cancel_preferences (GtkWidget *w, gpointer user_data)
{
+ preferences_window = NULL;
gtk_widget_destroy(w);
}
@@ -3190,7 +3112,9 @@ struct slapt_source_list *parse_disabled_package_sources (const char *file_name)
if (strstr(getline_buffer,"#DISABLED=") != NULL) {
if (g_size > 10) {
- slapt_add_source(list,getline_buffer + 10);
+ slapt_source_t *src = slapt_init_source(getline_buffer + 10);
+ if (src != NULL)
+ slapt_add_source(list,src);
}
}
}
@@ -3626,11 +3550,11 @@ static void build_verification_sources_treeviewlist (GtkWidget *treeview)
);
for (i = 0; i < global_config->sources->count; ++i) {
- if ( global_config->sources->url[i] == NULL )
+ if ( global_config->sources->src[i]->url == NULL )
continue;
gtk_list_store_append(store, &iter);
- gtk_list_store_set(store,&iter, 0,global_config->sources->url[i], -1);
+ gtk_list_store_set(store,&iter, 0,global_config->sources->src[i]->url, -1);
}
/* column for url */
@@ -3774,10 +3698,12 @@ void view_changelogs (GtkMenuItem *menuitem, gpointer user_data)
GtkWidget *textview, *scrolledwindow, *label;
GtkTextBuffer *changelog_buffer;
- if ( global_config->sources->url[i] == NULL )
+ if ( global_config->sources->src[i]->url == NULL )
+ continue;
+ if ( global_config->sources->src[i]->disabled == SLAPT_TRUE)
continue;
- source_url = g_strdup ( global_config->sources->url[i] );
+ source_url = g_strdup ( global_config->sources->src[i]->url );
changelog_filename = slapt_gen_filename_from_url(source_url,SLAPT_CHANGELOG_FILE);
path_and_file = g_strjoin("/", global_config->working_dir, changelog_filename, NULL);
@@ -3855,7 +3781,7 @@ void view_changelogs (GtkMenuItem *menuitem, gpointer user_data)
gtk_scrolled_window_set_policy ( GTK_SCROLLED_WINDOW(scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC );
gtk_container_add ( GTK_CONTAINER(scrolledwindow), textview );
- gtk_notebook_set_tab_label (GTK_NOTEBOOK (changelog_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (changelog_notebook), i), label);
+ gtk_notebook_set_tab_label (GTK_NOTEBOOK (changelog_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (changelog_notebook), changelogs), label);
g_free(changelog_txt);
g_free(source_url);
@@ -3870,3 +3796,83 @@ void view_changelogs (GtkMenuItem *menuitem, gpointer user_data)
}
}
+void cancel_source_edit (GtkWidget *w, gpointer user_data)
+{
+ gtk_widget_destroy(w);
+}
+
+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"));
+ GtkTreeIter iter;
+ GtkTreeModel *model;
+ GtkTreeView *source_tree = GTK_TREE_VIEW(lookup_widget(preferences_window,"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));
+
+ source = gtk_entry_get_text(source_entry);
+
+ if ( source == NULL || strlen(source) < 1 )
+ return;
+
+ 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) {
+ int i;
+
+ if ( gtk_tree_selection_get_selected(select,&model,&iter))
+ gtk_list_store_set(store, &iter, 1, source, 4, priority, -1);
+
+ } else {
+ const char *priority_str = slapt_priority_to_str(priority);
+ GdkPixbuf *status_icon = create_pixbuf("pkg_action_installed.png");
+ gtk_list_store_append(store, &iter);
+ gtk_list_store_set(store, &iter,
+ 0, status_icon,
+ 1, source,
+ 2, TRUE,
+ 3, priority_str,
+ 4, priority,
+ -1);
+ gdk_pixbuf_unref(status_icon);
+ }
+
+ sources_modified = TRUE;
+ gtk_widget_destroy(w);
+}
+
+static SLAPT_PRIORITY_T convert_gslapt_priority_to_slapt_priority(gint p)
+{
+ switch (p) {
+ case 1:
+ return SLAPT_PRIORITY_PREFERRED;
+ case 2:
+ return SLAPT_PRIORITY_OFFICIAL;
+ case 3:
+ return SLAPT_PRIORITY_CUSTOM;
+ case 0:
+ defualt:
+ return SLAPT_PRIORITY_DEFAULT;
+ };
+}
+
+static gint convert_slapt_priority_to_gslapt_priority(SLAPT_PRIORITY_T p)
+{
+ switch (p) {
+ case SLAPT_PRIORITY_DEFAULT:
+ return 0;
+ case SLAPT_PRIORITY_PREFERRED:
+ return 1;
+ case SLAPT_PRIORITY_OFFICIAL:
+ return 2;
+ case SLAPT_PRIORITY_CUSTOM:
+ return 3;
+ defualt:
+ return -1;
+ };
+}
+
diff --git a/src/callbacks.h b/src/callbacks.h
index 3c2bc91..7f9800a 100644
--- a/src/callbacks.h
+++ b/src/callbacks.h
@@ -107,3 +107,6 @@ void preferences_sources_add_key (GtkWidget *w, gpointer user_data);
void view_upgradeable_packages (GtkMenuItem *menuitem, gpointer user_data);
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);
diff --git a/src/interface.c b/src/interface.c
index f55252b..6ecac8a 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -66,12 +66,9 @@ create_window_preferences (void)
GtkWidget *scrolledwindow16;
GtkWidget *preferences_sources_treeview;
GtkWidget *vbox58;
- GtkWidget *preferences_remove_source_button;
- GtkWidget *button8;
- GtkWidget *hbox94;
- GtkWidget *label163;
- GtkWidget *new_source_entry;
GtkWidget *preferences_add_source_button;
+ GtkWidget *button8;
+ GtkWidget *preferences_remove_source_button;
GtkWidget *label160;
#ifdef SLAPT_HAS_GPGME
GtkWidget *preferences_verification_vbox;
@@ -309,39 +306,22 @@ create_window_preferences (void)
gtk_widget_show (vbox58);
gtk_box_pack_start (GTK_BOX (hbox93), vbox58, FALSE, FALSE, 0);
- preferences_remove_source_button = gtk_button_new_from_stock ("gtk-remove");
- gtk_widget_set_name (preferences_remove_source_button, "preferences_remove_source_button");
- gtk_widget_show (preferences_remove_source_button);
- gtk_box_pack_start (GTK_BOX (vbox58), preferences_remove_source_button, FALSE, FALSE, 0);
- GTK_WIDGET_SET_FLAGS (preferences_remove_source_button, GTK_CAN_DEFAULT);
+ preferences_add_source_button = gtk_button_new_from_stock ("gtk-add");
+ gtk_widget_set_name (preferences_add_source_button, "preferences_add_source_button");
+ gtk_widget_show (preferences_add_source_button);
+ gtk_box_pack_start (GTK_BOX (vbox58), preferences_add_source_button, FALSE, FALSE, 0);
+ GTK_WIDGET_SET_FLAGS (preferences_add_source_button, GTK_CAN_DEFAULT);
button8 = gtk_button_new_from_stock ("gtk-edit");
gtk_widget_set_name (button8, "button8");
gtk_widget_show (button8);
gtk_box_pack_start (GTK_BOX (vbox58), button8, FALSE, FALSE, 0);
- hbox94 = gtk_hbox_new (FALSE, 2);
- gtk_widget_set_name (hbox94, "hbox94");
- gtk_widget_show (hbox94);
- gtk_box_pack_start (GTK_BOX (vbox57), hbox94, FALSE, TRUE, 0);
- gtk_container_set_border_width (GTK_CONTAINER (hbox94), 6);
-
- label163 = gtk_label_new (_("<span weight=\"bold\">SOURCE=</span>"));
- gtk_widget_set_name (label163, "label163");
- gtk_widget_show (label163);
- gtk_box_pack_start (GTK_BOX (hbox94), label163, FALSE, FALSE, 0);
- gtk_label_set_use_markup (GTK_LABEL (label163), TRUE);
-
- new_source_entry = gtk_entry_new ();
- gtk_widget_set_name (new_source_entry, "new_source_entry");
- gtk_widget_show (new_source_entry);
- gtk_box_pack_start (GTK_BOX (hbox94), new_source_entry, TRUE, TRUE, 0);
-
- preferences_add_source_button = gtk_button_new_from_stock ("gtk-add");
- gtk_widget_set_name (preferences_add_source_button, "preferences_add_source_button");
- gtk_widget_show (preferences_add_source_button);
- gtk_box_pack_start (GTK_BOX (hbox94), preferences_add_source_button, FALSE, FALSE, 0);
- GTK_WIDGET_SET_FLAGS (preferences_add_source_button, GTK_CAN_DEFAULT);
+ preferences_remove_source_button = gtk_button_new_from_stock ("gtk-remove");
+ gtk_widget_set_name (preferences_remove_source_button, "preferences_remove_source_button");
+ gtk_widget_show (preferences_remove_source_button);
+ gtk_box_pack_start (GTK_BOX (vbox58), preferences_remove_source_button, FALSE, FALSE, 0);
+ GTK_WIDGET_SET_FLAGS (preferences_remove_source_button, GTK_CAN_DEFAULT);
label160 = gtk_label_new (_("Sources"));
gtk_widget_set_name (label160, "label160");
@@ -453,20 +433,14 @@ create_window_preferences (void)
g_signal_connect_swapped ((gpointer) preferences_add_exclude_button, "clicked",
G_CALLBACK (preferences_exclude_add),
GTK_OBJECT (window_preferences));
- g_signal_connect_swapped ((gpointer) preferences_remove_source_button, "clicked",
- G_CALLBACK (preferences_sources_remove),
+ g_signal_connect_swapped ((gpointer) preferences_add_source_button, "clicked",
+ G_CALLBACK (preferences_sources_add),
GTK_OBJECT (window_preferences));
g_signal_connect_swapped ((gpointer) button8, "clicked",
G_CALLBACK (preferences_sources_edit),
GTK_OBJECT (window_preferences));
- g_signal_connect_swapped ((gpointer) new_source_entry, "editing_done",
- G_CALLBACK (preferences_sources_add),
- GTK_OBJECT (window_preferences));
- g_signal_connect_swapped ((gpointer) new_source_entry, "activate",
- G_CALLBACK (preferences_sources_add),
- GTK_OBJECT (window_preferences));
- g_signal_connect_swapped ((gpointer) preferences_add_source_button, "clicked",
- G_CALLBACK (preferences_sources_add),
+ g_signal_connect_swapped ((gpointer) preferences_remove_source_button, "clicked",
+ G_CALLBACK (preferences_sources_remove),
GTK_OBJECT (window_preferences));
#ifdef SLAPT_HAS_GPGME
g_signal_connect_swapped ((gpointer) button9, "clicked",
@@ -517,12 +491,9 @@ create_window_preferences (void)
GLADE_HOOKUP_OBJECT (window_preferences, scrolledwindow16, "scrolledwindow16");
GLADE_HOOKUP_OBJECT (window_preferences, preferences_sources_treeview, "preferences_sources_treeview");
GLADE_HOOKUP_OBJECT (window_preferences, vbox58, "vbox58");
- GLADE_HOOKUP_OBJECT (window_preferences, preferences_remove_source_button, "preferences_remove_source_button");
- GLADE_HOOKUP_OBJECT (window_preferences, button8, "button8");
- GLADE_HOOKUP_OBJECT (window_preferences, hbox94, "hbox94");
- GLADE_HOOKUP_OBJECT (window_preferences, label163, "label163");
- GLADE_HOOKUP_OBJECT (window_preferences, new_source_entry, "new_source_entry");
GLADE_HOOKUP_OBJECT (window_preferences, preferences_add_source_button, "preferences_add_source_button");
+ GLADE_HOOKUP_OBJECT (window_preferences, button8, "button8");
+ GLADE_HOOKUP_OBJECT (window_preferences, preferences_remove_source_button, "preferences_remove_source_button");
GLADE_HOOKUP_OBJECT (window_preferences, label160, "label160");
#ifdef SLAPT_HAS_GPGME
GLADE_HOOKUP_OBJECT (window_preferences, preferences_verification_vbox, "preferences_verification_vbox");
@@ -2901,3 +2872,124 @@ create_changelog_window (void)
return changelog_window;
}
+GtkWidget*
+create_source_window (void)
+{
+ GtkWidget *source_window;
+ GdkPixbuf *source_window_icon_pixbuf;
+ GtkWidget *vbox79;
+ GtkWidget *table6;
+ GtkWidget *priority_label;
+ GtkWidget *source_label;
+ GtkWidget *source_entry;
+ GtkWidget *source_priority;
+ GtkWidget *hbuttonbox4;
+ GtkWidget *button13;
+ GtkWidget *button14;
+
+ source_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_widget_set_name (source_window, "source_window");
+ gtk_container_set_border_width (GTK_CONTAINER (source_window), 6);
+ gtk_window_set_title (GTK_WINDOW (source_window), _("Package Source"));
+ gtk_window_set_position (GTK_WINDOW (source_window), GTK_WIN_POS_CENTER);
+ gtk_window_set_modal (GTK_WINDOW (source_window), TRUE);
+ source_window_icon_pixbuf = create_pixbuf ("gslapt.png");
+ if (source_window_icon_pixbuf)
+ {
+ gtk_window_set_icon (GTK_WINDOW (source_window), source_window_icon_pixbuf);
+ gdk_pixbuf_unref (source_window_icon_pixbuf);
+ }
+
+ vbox79 = gtk_vbox_new (FALSE, 0);
+ gtk_widget_set_name (vbox79, "vbox79");
+ gtk_widget_show (vbox79);
+ gtk_container_add (GTK_CONTAINER (source_window), vbox79);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox79), 6);
+
+ table6 = gtk_table_new (2, 2, FALSE);
+ gtk_widget_set_name (table6, "table6");
+ gtk_widget_show (table6);
+ gtk_box_pack_start (GTK_BOX (vbox79), table6, TRUE, TRUE, 6);
+ gtk_container_set_border_width (GTK_CONTAINER (table6), 6);
+ gtk_table_set_row_spacings (GTK_TABLE (table6), 6);
+ gtk_table_set_col_spacings (GTK_TABLE (table6), 6);
+
+ priority_label = gtk_label_new (_("<b>Priority:</b>"));
+ gtk_widget_set_name (priority_label, "priority_label");
+ gtk_widget_show (priority_label);
+ gtk_table_attach (GTK_TABLE (table6), priority_label, 0, 1, 1, 2,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (GTK_FILL), 6, 0);
+ gtk_label_set_use_markup (GTK_LABEL (priority_label), TRUE);
+ gtk_misc_set_alignment (GTK_MISC (priority_label), 0, 0.5);
+
+ source_label = gtk_label_new (_("<b>Source:</b>"));
+ gtk_widget_set_name (source_label, "source_label");
+ gtk_widget_show (source_label);
+ gtk_table_attach (GTK_TABLE (table6), source_label, 0, 1, 0, 1,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (GTK_FILL), 6, 0);
+ gtk_label_set_use_markup (GTK_LABEL (source_label), TRUE);
+ gtk_misc_set_alignment (GTK_MISC (source_label), 0, 0.5);
+
+ source_entry = gtk_entry_new ();
+ gtk_widget_set_name (source_entry, "source_entry");
+ gtk_widget_show (source_entry);
+ gtk_table_attach (GTK_TABLE (table6), source_entry, 1, 2, 0, 1,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (GTK_EXPAND), 0, 0);
+ gtk_entry_set_invisible_char (GTK_ENTRY (source_entry), 9679);
+ gtk_entry_set_width_chars (GTK_ENTRY (source_entry), 60);
+
+ source_priority = gtk_combo_box_entry_new_text ();
+ gtk_widget_set_name (source_priority, "source_priority");
+ gtk_widget_show (source_priority);
+ gtk_table_attach (GTK_TABLE (table6), source_priority, 1, 2, 1, 2,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
+ gtk_container_set_border_width (GTK_CONTAINER (source_priority), 6);
+ gtk_combo_box_append_text (GTK_COMBO_BOX (source_priority), _("Default"));
+ gtk_combo_box_append_text (GTK_COMBO_BOX (source_priority), _("Preferred"));
+ gtk_combo_box_append_text (GTK_COMBO_BOX (source_priority), _("Official"));
+ gtk_combo_box_append_text (GTK_COMBO_BOX (source_priority), _("Custom"));
+
+ hbuttonbox4 = gtk_hbutton_box_new ();
+ gtk_widget_set_name (hbuttonbox4, "hbuttonbox4");
+ gtk_widget_show (hbuttonbox4);
+ gtk_box_pack_start (GTK_BOX (vbox79), hbuttonbox4, FALSE, TRUE, 0);
+ gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox4), GTK_BUTTONBOX_END);
+
+ button13 = gtk_button_new_from_stock ("gtk-cancel");
+ gtk_widget_set_name (button13, "button13");
+ gtk_widget_show (button13);
+ gtk_container_add (GTK_CONTAINER (hbuttonbox4), button13);
+ GTK_WIDGET_SET_FLAGS (button13, GTK_CAN_DEFAULT);
+
+ button14 = gtk_button_new_from_stock ("gtk-ok");
+ gtk_widget_set_name (button14, "button14");
+ gtk_widget_show (button14);
+ gtk_container_add (GTK_CONTAINER (hbuttonbox4), button14);
+ GTK_WIDGET_SET_FLAGS (button14, GTK_CAN_DEFAULT);
+
+ g_signal_connect_swapped ((gpointer) button13, "clicked",
+ G_CALLBACK (cancel_source_edit),
+ GTK_OBJECT (source_window));
+ g_signal_connect_swapped ((gpointer) button14, "clicked",
+ G_CALLBACK (source_edit_ok),
+ GTK_OBJECT (source_window));
+
+ /* Store pointers to all widgets, for use by lookup_widget(). */
+ GLADE_HOOKUP_OBJECT_NO_REF (source_window, source_window, "source_window");
+ GLADE_HOOKUP_OBJECT (source_window, vbox79, "vbox79");
+ GLADE_HOOKUP_OBJECT (source_window, table6, "table6");
+ GLADE_HOOKUP_OBJECT (source_window, priority_label, "priority_label");
+ GLADE_HOOKUP_OBJECT (source_window, source_label, "source_label");
+ GLADE_HOOKUP_OBJECT (source_window, source_entry, "source_entry");
+ GLADE_HOOKUP_OBJECT (source_window, source_priority, "source_priority");
+ GLADE_HOOKUP_OBJECT (source_window, hbuttonbox4, "hbuttonbox4");
+ GLADE_HOOKUP_OBJECT (source_window, button13, "button13");
+ GLADE_HOOKUP_OBJECT (source_window, button14, "button14");
+
+ return source_window;
+}
+
diff --git a/src/interface.h b/src/interface.h
index 33a04da..973e397 100644
--- a/src/interface.h
+++ b/src/interface.h
@@ -14,3 +14,4 @@ GtkWidget* create_repositories_changed (void);
GtkWidget* create_dep_error_dialog (void);
GtkWidget* create_source_failed_dialog (void);
GtkWidget* create_changelog_window (void);
+GtkWidget* create_source_window (void);
diff --git a/src/main.c b/src/main.c
index 598b584..a64a54b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -31,7 +31,6 @@ struct slapt_pkg_list *all;
GtkWidget *gslapt;
slapt_transaction_t *trans = NULL;
char rc_location[1024];
-struct slapt_source_list *disabled_sources;
int main (int argc, char *argv[]) {
GtkStatusbar *bar;
@@ -138,11 +137,9 @@ int main (int argc, char *argv[]) {
if (rc == NULL) {
global_config = slapt_read_rc_config(RC_LOCATION);
strncpy(rc_location,RC_LOCATION,1023);
- disabled_sources = parse_disabled_package_sources(rc_location);
} else {
global_config = slapt_read_rc_config(rc);
strncpy(rc_location,rc,1023);
- disabled_sources = parse_disabled_package_sources(rc_location);
}
if (global_config == NULL)
exit(1);