[PolicyKit-gnome] Bug 584847 – Get rid of libsexy, use new GtkLabel link support
- From: David Zeuthen <davidz src gnome org>
- To: svn-commits-list gnome org
- Subject: [PolicyKit-gnome] Bug 584847 – Get rid of libsexy, use new GtkLabel link support
- Date: Mon, 22 Jun 2009 11:53:56 -0400 (EDT)
commit f847e2d6fa4bd8a917573628424f043e1a445cd5
Author: David Zeuthen <davidz redhat com>
Date: Mon Jun 22 11:50:39 2009 -0400
Bug 584847 â?? Get rid of libsexy, use new GtkLabel link support
Based on a patch from Luis Menina <liberforce freeside fr>.
configure.ac | 2 +-
src/Makefile.am | 1 -
src/polkitgnomeauthenticationdialog.c | 25 +-
src/sexy-url-label.c | 869 ---------------------------------
src/sexy-url-label.h | 73 ---
5 files changed, 10 insertions(+), 960 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 6b18edc..ffb18aa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -116,7 +116,7 @@ GNOME_MAINTAINER_MODE_DEFINES
# Check for required packages
# ***************************
-GTK_REQUIRED=2.13.6
+GTK_REQUIRED=2.17.1
POLKIT_AGENT_REQUIRED=0.90
POLKIT_GOBJECT_REQUIRED=0.90
diff --git a/src/Makefile.am b/src/Makefile.am
index 624ad87..5ac89a7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -13,7 +13,6 @@ polkit_gnome_authentication_agent_1_SOURCES = \
polkitgnomelistener.h polkitgnomelistener.c \
polkitgnomeauthenticator.h polkitgnomeauthenticator.c \
polkitgnomeauthenticationdialog.h polkitgnomeauthenticationdialog.c \
- sexy-url-label.h sexy-url-label.c \
main.c \
$(BUILT_SOURCES)
diff --git a/src/polkitgnomeauthenticationdialog.c b/src/polkitgnomeauthenticationdialog.c
index 1a26b3d..8866ca3 100644
--- a/src/polkitgnomeauthenticationdialog.c
+++ b/src/polkitgnomeauthenticationdialog.c
@@ -37,7 +37,6 @@
#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
-#include "sexy-url-label.h"
#include "polkitgnomeauthenticationdialog.h"
#define RESPONSE_USER_SELECTED 1001
@@ -416,14 +415,7 @@ add_row (GtkWidget *table, int row, const char *label_text, GtkWidget *entry)
}
static void
-vendor_url_activated (SexyUrlLabel *url_label, char *url, gpointer user_data)
-{
- if (url != NULL)
- gtk_show_uri (NULL, url, GDK_CURRENT_TIME, NULL);
-}
-
-static void
-action_id_activated (SexyUrlLabel *url_label, char *url, gpointer user_data)
+action_id_activated (GtkLabel *url_label, gpointer user_data)
{
#if 0
GError *error;
@@ -452,7 +444,7 @@ action_id_activated (SexyUrlLabel *url_label, char *url, gpointer user_data)
if (!dbus_g_proxy_call (manager_proxy,
"ShowAction",
&error,
- G_TYPE_STRING, url,
+ G_TYPE_STRING, gtk_label_get_current_uri (GTK_LABEL (url_label)),
G_TYPE_INVALID,
G_TYPE_INVALID))
{
@@ -683,15 +675,16 @@ polkit_gnome_authentication_dialog_constructed (GObject *object)
/* --- */
- label = sexy_url_label_new ();
+ label = gtk_label_new (NULL);
+ gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
s = g_strdup_printf ("<small><a href=\"%s\">%s</a></small>",
dialog->priv->action_id,
dialog->priv->action_id);
- sexy_url_label_set_markup (SEXY_URL_LABEL (label), s);
+ gtk_label_set_markup (GTK_LABEL (label), s);
g_free (s);
gtk_misc_set_alignment (GTK_MISC (label), 0, 1.0);
add_row (table, rows++, _("<small><b>Action:</b></small>"), label);
- g_signal_connect (label, "url-activated", G_CALLBACK (action_id_activated), NULL);
+ g_signal_connect (label, "activate-link", G_CALLBACK (action_id_activated), NULL);
s = g_strdup_printf (_("Click to edit %s"), dialog->priv->action_id);
gtk_widget_set_tooltip_markup (label, s);
@@ -699,15 +692,15 @@ polkit_gnome_authentication_dialog_constructed (GObject *object)
/* --- */
- label = sexy_url_label_new ();
+ label = gtk_label_new (NULL);
+ gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
s = g_strdup_printf ("<small><a href=\"%s\">%s</a></small>",
dialog->priv->vendor_url,
dialog->priv->vendor);
- sexy_url_label_set_markup (SEXY_URL_LABEL (label), s);
+ gtk_label_set_markup (GTK_LABEL (label), s);
g_free (s);
gtk_misc_set_alignment (GTK_MISC (label), 0, 1.0);
add_row (table, rows++, _("<small><b>Vendor:</b></small>"), label);
- g_signal_connect (label, "url-activated", G_CALLBACK (vendor_url_activated), NULL);
s = g_strdup_printf (_("Click to open %s"), dialog->priv->vendor_url);
gtk_widget_set_tooltip_markup (label, s);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]