[gnome-packagekit] Show the package name in the repo-signature dialog. Fixes fd#21236
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-packagekit] Show the package name in the repo-signature dialog. Fixes fd#21236
- Date: Tue, 21 Apr 2009 08:06:02 -0400 (EDT)
commit 269207b8e3cffbb0d43a3c1d45dce08b5b8e8988
Author: Richard Hughes <richard hughsie com>
Date: Tue Apr 21 13:05:02 2009 +0100
Show the package name in the repo-signature dialog. Fixes fd#21236
---
data/gpk-signature.ui | 82 ++++++++++++++++++++++++++++++---------
src/gpk-helper-repo-signature.c | 13 ++++++
2 files changed, 76 insertions(+), 19 deletions(-)
diff --git a/data/gpk-signature.ui b/data/gpk-signature.ui
index 290cd29..b8c7e0d 100644
--- a/data/gpk-signature.ui
+++ b/data/gpk-signature.ui
@@ -1,14 +1,15 @@
<?xml version="1.0"?>
-<!--*- mode: xml -*-->
<interface>
+ <requires lib="gtk+" version="2.16"/>
+ <!-- interface-naming-policy toplevel-contextual -->
<object class="GtkDialog" id="dialog_gpg">
<property name="border_width">6</property>
<property name="title" translatable="yes">Software signature is required</property>
<property name="resizable">False</property>
<property name="modal">True</property>
- <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+ <property name="window_position">center-on-parent</property>
<property name="destroy_with_parent">True</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="type_hint">dialog</property>
<property name="has_separator">False</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox1">
@@ -32,14 +33,18 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="position">0</property>
</packing>
</child>
</object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
</child>
<child>
<object class="GtkTable" id="table1">
<property name="visible">True</property>
- <property name="n_rows">4</property>
+ <property name="n_rows">5</property>
<property name="n_columns">2</property>
<property name="column_spacing">12</property>
<property name="row_spacing">6</property>
@@ -51,7 +56,7 @@
</object>
<packing>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
+ <property name="y_options"></property>
</packing>
</child>
<child>
@@ -64,7 +69,7 @@
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
+ <property name="y_options"></property>
</packing>
</child>
<child>
@@ -77,7 +82,7 @@
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
+ <property name="y_options"></property>
</packing>
</child>
<child>
@@ -90,7 +95,7 @@
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
+ <property name="y_options"></property>
</packing>
</child>
<child>
@@ -105,7 +110,7 @@
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
+ <property name="y_options"></property>
</packing>
</child>
<child>
@@ -120,7 +125,7 @@
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
+ <property name="y_options"></property>
</packing>
</child>
<child>
@@ -135,7 +140,7 @@
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
+ <property name="y_options"></property>
</packing>
</child>
<child>
@@ -147,7 +152,35 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="y_options"/>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label7">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Package:</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"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label_package">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label">kernel</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"></property>
</packing>
</child>
</object>
@@ -176,49 +209,60 @@
<child internal-child="action_area">
<object class="GtkHButtonBox" id="dialog-action_area1">
<property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
+ <property name="layout_style">end</property>
<child>
<object class="GtkButton" id="button_help">
+ <property name="label">gtk-help</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
- <property name="label">gtk-help</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>
<property name="secondary">True</property>
</packing>
</child>
<child>
<object class="GtkButton" id="button_no">
+ <property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
- <property name="label">gtk-cancel</property>
+ <property name="receives_default">False</property>
<property name="use_stock">True</property>
</object>
<packing>
- <property name="pack_type">GTK_PACK_END</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="button_yes">
+ <property name="label">gtk-yes</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
- <property name="label">gtk-yes</property>
+ <property name="receives_default">False</property>
<property name="use_stock">True</property>
</object>
<packing>
- <property name="pack_type">GTK_PACK_END</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
- <property name="pack_type">GTK_PACK_END</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
</packing>
</child>
</object>
diff --git a/src/gpk-helper-repo-signature.c b/src/gpk-helper-repo-signature.c
index b322a1b..147d68c 100644
--- a/src/gpk-helper-repo-signature.c
+++ b/src/gpk-helper-repo-signature.c
@@ -23,6 +23,7 @@
#include <glib/gi18n.h>
#include <gtk/gtk.h>
+#include <packagekit-glib/packagekit.h>
#include "gpk-helper-repo-signature.h"
#include "gpk-marshal.h"
@@ -95,6 +96,8 @@ gpk_helper_repo_signature_show (GpkHelperRepoSignature *helper, const gchar *pac
const gchar *key_fingerprint, const gchar *key_timestamp)
{
GtkWidget *widget;
+ PkPackageId *id;
+ gchar *text;
g_return_val_if_fail (GPK_IS_HELPER_REPO_SIGNATURE (helper), FALSE);
g_return_val_if_fail (package_id != NULL, FALSE);
@@ -115,6 +118,16 @@ gpk_helper_repo_signature_show (GpkHelperRepoSignature *helper, const gchar *pac
widget = GTK_WIDGET (gtk_builder_get_object (helper->priv->builder, "label_id"));
gtk_label_set_label (GTK_LABEL (widget), key_id);
+ /* TODO: pass this as a struct from the PkClient signal */
+ id = pk_package_id_new_from_string (package_id);
+ text = gpk_package_id_name_version (id);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (helper->priv->builder, "label_package"));
+ gtk_label_set_label (GTK_LABEL (widget), text);
+
+ g_free (text);
+ pk_package_id_free (id);
+
/* show window */
widget = GTK_WIDGET (gtk_builder_get_object (helper->priv->builder, "dialog_gpg"));
gtk_widget_show (widget);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]