kov changed libgksu/branches/libgksu2/ChangeLog,
libgksu/branches/libgksu2/configure.ac,
libgksu/branches/libgksu2/libgksuui/ChangeLog,
libgksu/branches/libgksu2/libgksuui/Makefile.am,
libgksu/branches/libgksu2/libgksuui/gksuui-convenience.c,
libgksu/branches/libgksu2/libgksuui/gksuui-convenience.h,
libgksu/branches/libgksu2/libgksuui/libgksuui.ver,
libgksu/branches/libgksu2/libgksuui/libgksuui1.1.pc.in,
libgksu/branches/libgksu2/libgksuui/test-gksuui.c
Gustavo Noronha
kov at costa.debian.org
Sat Jan 7 21:46:39 UTC 2006
- Previous message: kov changed libgksu/branches/libgksu2/aclocal.m4
- Next message: kov changed libgksu/branches/libgksu2/ChangeLog,
libgksu/branches/libgksu2/Makefile.am,
libgksu/branches/libgksu2/aclocal.m4,
libgksu/branches/libgksu2/config.h.in,
libgksu/branches/libgksu2/configure.ac,
libgksu/branches/libgksu2/intl/,
libgksu/branches/libgksu2/intltool-extract.in,
libgksu/branches/libgksu2/po/POTFILES.in,
libgksu/branches/libgksu2/po/ca.po,
libgksu/branches/libgksu2/po/cs.po,
libgksu/branches/libgksu2/po/da.po,
libgksu/branches/libgksu2/po/de.po,
libgksu/branches/libgksu2/po/es.po,
libgksu/branches/libgksu2/po/eu.po,
libgksu/branches/libgksu2/po/hu.po,
libgksu/branches/libgksu2/po/nb.po,
libgksu/branches/libgksu2/po/nl.po,
libgksu/branches/libgksu2/po/pl.po,
libgksu/branches/libgksu2/po/pt_BR.po,
libgksu/branches/libgksu2/po/ro.po,
libgksu/branches/libgksu2/po/ru.po,
libgksu/branches/libgksu2/po/sk.po
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Mensagem de log:
make libgksuui a static library for internal use only; removed
the gksuui-convenience stuff that's not going to be used
-----
Modified: libgksu/branches/libgksu2/ChangeLog
===================================================================
--- libgksu/branches/libgksu2/ChangeLog 2006-01-07 21:44:47 UTC (rev 498)
+++ libgksu/branches/libgksu2/ChangeLog 2006-01-07 21:46:38 UTC (rev 499)
@@ -1,3 +1,9 @@
+2006-01-07 Gustavo Noronha Silva <kov at debian.org>
+
+ * configure.ac:
+ - do not create pkg-config files for libgksuui; it won't
+ be installed anymore
+
2005-12-11 Gustavo Noronha Silva <kov at debian.org>
* gksu.schemas.in:
Modified: libgksu/branches/libgksu2/configure.ac
===================================================================
--- libgksu/branches/libgksu2/configure.ac 2006-01-07 21:44:47 UTC (rev 498)
+++ libgksu/branches/libgksu2/configure.ac 2006-01-07 21:46:38 UTC (rev 499)
@@ -80,7 +80,6 @@
libgksu/Makefile
libgksu/libgksu2.pc
libgksuui/Makefile
- libgksuui/libgksuui1.1.pc
docs/Makefile
])
AC_OUTPUT
Modified: libgksu/branches/libgksu2/libgksuui/ChangeLog
===================================================================
--- libgksu/branches/libgksu2/libgksuui/ChangeLog 2006-01-07 21:44:47 UTC (rev 498)
+++ libgksu/branches/libgksu2/libgksuui/ChangeLog 2006-01-07 21:46:38 UTC (rev 499)
@@ -1,3 +1,9 @@
+2006-01-07 Gustavo Noronha Silva <kov at debian.org>
+
+ * Make it a sub, static library for libgksu only.
+ - removed gksu-convenience stuff, that is not going to
+ be used anymore
+
2005-11-05 Gustavo Noronha Silva <kov at debian.org>
* Release 1.0.7
Modified: libgksu/branches/libgksu2/libgksuui/Makefile.am
===================================================================
--- libgksu/branches/libgksu2/libgksuui/Makefile.am 2006-01-07 21:44:47 UTC (rev 498)
+++ libgksu/branches/libgksu2/libgksuui/Makefile.am 2006-01-07 21:46:38 UTC (rev 499)
@@ -2,26 +2,14 @@
INCLUDES = `pkg-config --cflags gtk+-2.0`
AM_CPPFLAGS = -DLOCALEDIR=\"$(datadir)/locale\" -DDATA_DIR=\"$(datadir)\" -DPREFIX=\"$(prefix)\"
-lib_LTLIBRARIES = libgksuui1.0.la
-libgksuui1_0_la_SOURCES = gksuui-dialog.c gksuui-convenience.c
-# 0.0.0 -> major.minor.micro
-# major -> breaks backward compatibility (changes to existing ABI)
-# minor -> keeps compatibility (additions to the API)
-# micro -> no change to the API/ABI
-libgksuui1_0_la_LDFLAGS = -version-info 1:0:0 -Wl,-O1 -Wl,--version-script=libgksuui.ver `pkg-config --libs gtk+-2.0`
+noinst_LTLIBRARIES = libgksuui1.0.la
+libgksuui1_0_la_SOURCES = gksuui-dialog.c
+libgksuui1_0_la_LDFLAGS = -Wl,-O1 -static `pkg-config --libs gtk+-2.0`
-noinst_HEADERS = defines.h
-
-include_HEADERS = gksuui.h gksuui-dialog.h gksuui-convenience.h
+noinst_HEADERS = defines.h gksuui.h gksuui-dialog.h
includedir = ${prefix}/include/$(PACKAGE)
-pkgconfigdir = ${libdir}/pkgconfig
-pkgconfig_DATA = libgksuui1.1.pc
-
noinst_PROGRAMS = test-gksuui
test_gksuui_SOURCES = test-gksuui.c
test_gksuui_LDADD = libgksuui1.0.la
test_gksuui_LDFLAGS = `pkg-config --libs glib-2.0`
-
-EXTRA_DIST = libgksuui.ver
-
Deleted: libgksu/branches/libgksu2/libgksuui/gksuui-convenience.c
===================================================================
--- libgksu/branches/libgksu2/libgksuui/gksuui-convenience.c 2006-01-07 21:44:47 UTC (rev 498)
+++ libgksu/branches/libgksu2/libgksuui/gksuui-convenience.c 2006-01-07 21:46:38 UTC (rev 499)
@@ -1,273 +0,0 @@
-/*
- * libgksuui -- Gtk+ widget and convenience functions for requesting passwords
- * Copyright (C) 2004 Gustavo Noronha Silva
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <sys/select.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-#include <gtk/gtk.h>
-#include <gdk/gdkx.h>
-#include <X11/Xlib.h>
-#include <locale.h>
-
-#include "../config.h"
-#include "defines.h"
-
-#include "gksuui-dialog.h"
-#include "gksuui-convenience.h"
-
-/* copied from gnome-ssh-askpass */
-#define GRAB_TRIES 16
-#define GRAB_WAIT 250 /* milliseconds */
-
-static gboolean
-gksu_check_init ()
-{
- gint fakeargc = 1;
- gchar **fakeargv = g_new (gchar*, 2);
- gint return_value;
-
- fakeargv[0] = g_strdup ("libgksu");
- fakeargv[1] = NULL;
-
- return_value = gtk_init_check (&fakeargc, &fakeargv);
-
- g_free (fakeargv[0]);
- g_free (fakeargv);
-
- if (!return_value)
- fprintf (stderr, _("libgksu: Failed to init the Gtk+ library, "
- "GKSu is not able to continue.\n"));
-
- return return_value;
-}
-
-/**
- * gk_dialog:
- * @type: a #GtkMessageType (GTK_MESSAGE_{INFO,ERROR,WARNING})
- * @format: a printf()-like format for the label of the dialog
- * @Varargs: the actual variables.
- *
- * Shows 'msg' in a dialog box with an OK button
- * This function is to be a helper for functions needing to
- * display some information to the user.
- * Notice that it will not let the program go on if the
- * user does not close the dialog.
-*/
-static void
-gk_dialog (GtkMessageType type, gchar *format, ...)
-{
- GtkWidget *diag_win;
-
- va_list ap;
- gchar *msg;
-
- va_start(ap, format);
- msg = g_strdup_vprintf(format, ap);
- va_end(ap);
-
- diag_win = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
- type, GTK_BUTTONS_CLOSE,
- msg);
-
- gtk_signal_connect_object (GTK_OBJECT(diag_win), "delete_event",
- GTK_SIGNAL_FUNC(gtk_main_quit),
- NULL);
- gtk_window_set_position (GTK_WINDOW(diag_win), GTK_WIN_POS_CENTER);
- gtk_window_set_resizable (GTK_WINDOW(diag_win), FALSE);
-
- gtk_widget_show_all (diag_win);
- gtk_dialog_run (GTK_DIALOG(diag_win));
-
- g_free (msg);
-
- gtk_widget_destroy (diag_win);
-}
-
-/**
- * gksu_secure_free:
- * @string: string to be freed securely
- *
- * Clears variables filling them with 0's previously
- */
-static void
-gksu_secure_free (gchar *string)
-{
- if (string != NULL)
- {
- memset (string, 0, strlen(string));
- g_free (string);
- }
-}
-
-typedef enum
- {
- FAILED_GRAB_MOUSE,
- FAILED_GRAB_KEYBOARD
- } FailedGrabWhat;
-
-/**
- * report_failed_grab:
- * @what: a #FailedGrabWhat describing what failed to
- * grab (mouse or keyboard)
- *
- * Simple utility function called to report a fail on
- * the process of grabbing the mouse or keyboard when
- * asking for the password through ask_password()
- */
-void
-report_failed_grab (FailedGrabWhat what)
-{
- switch (what)
- {
- case FAILED_GRAB_MOUSE:
- gk_dialog (GTK_MESSAGE_WARNING,
- _("Could not grab your mouse.\n"
- "A malicious client may be eavesdropping\n"
- "on your session."));
- break;
- case FAILED_GRAB_KEYBOARD:
- gk_dialog (GTK_MESSAGE_WARNING,
- _("Could not grab your keyboard.\n"
- "A malicious client may be eavesdropping\n"
- "on your session."));
- break;
- }
-}
-
-/**
- * gksu_ask_password:
- * @title: the title of the dialog
- * @message: the message to use to request password from user
- * @grab: should the X keyboard and mouse inputs be grabbed
- *
- * This is a convenience function to create a #GksuuiDialog and
- *
- *
- * Returns: a newly allocated gchar containing the password
- * or NULL if an error happens or the user cancels the action
- */
-gchar*
-gksu_ask_password (gchar *title, gchar *message, gboolean grab)
-{
- gchar *pass = NULL;
-
- GtkWidget *dialog;
-
- gint response;
-
- /*
- make sure we're using UTF-8 and getting our locale files
- from the right place
- */
- bindtextdomain(PACKAGE_NAME, LOCALEDIR);
- bind_textdomain_codeset (PACKAGE_NAME, "UTF-8");
-
- if (!gksu_check_init ())
- return NULL;
-
- /* dialog window */
- dialog = gksuui_dialog_new ();
-
- if(title != NULL)
- gtk_window_set_title(GTK_WINDOW(dialog), title);
- if(message != NULL)
- gksuui_dialog_set_message(GKSUUI_DIALOG(dialog), message);
-
- gtk_window_set_keep_above(GTK_WINDOW(dialog), TRUE);
- gtk_widget_show_all (dialog);
-
- while (gtk_events_pending())
- gtk_main_iteration ();
-
- if (grab)
- {
- GdkGrabStatus status;
- gint grab_tries = 0;
-
- for(;;)
- {
- status = gdk_pointer_grab((GTK_WIDGET(dialog))->window, TRUE, 0, NULL,
- NULL, GDK_CURRENT_TIME);
- if (status == GDK_GRAB_SUCCESS)
- break;
- usleep(GRAB_WAIT * 1000);
- if (++grab_tries > GRAB_TRIES)
- report_failed_grab (FAILED_GRAB_MOUSE);
- }
-
- for(;;)
- {
- status = gdk_keyboard_grab((GTK_WIDGET(dialog))->window,
- FALSE, GDK_CURRENT_TIME);
- if (status == GDK_GRAB_SUCCESS)
- break;
-
- usleep(GRAB_WAIT * 1000);
-
- if (++grab_tries > GRAB_TRIES)
- report_failed_grab (FAILED_GRAB_KEYBOARD);
- }
-
- gdk_x11_grab_server();
- }
-
- /* let the magic begin */
- response = gtk_dialog_run (GTK_DIALOG(dialog));
-
- if (grab)
- {
- /* Ungrab */
- XUngrabServer(GDK_DISPLAY());
- gdk_pointer_ungrab(GDK_CURRENT_TIME);
- gdk_keyboard_ungrab(GDK_CURRENT_TIME);
- gdk_flush();
- }
-
- {
- GtkWidget *entry = GKSUUI_DIALOG(dialog)->entry;
-
- /* Report passphrase if user selected OK */
- pass = g_strdup (gtk_entry_get_text(GTK_ENTRY(entry)));
- /* Kill the entry's copy of the passphrase. */
- gtk_entry_set_text(GTK_ENTRY(entry), "");
- }
-
- switch (response)
- {
- case GTK_RESPONSE_CANCEL:
- case GTK_RESPONSE_DELETE_EVENT:
- case GTK_RESPONSE_NONE:
- gtk_widget_destroy (dialog);
- gksu_secure_free (pass);
- return 0;
- }
-
- gtk_widget_destroy (dialog);
-
- while (gtk_events_pending())
- gtk_main_iteration();
-
- return pass;
-}
-
Deleted: libgksu/branches/libgksu2/libgksuui/gksuui-convenience.h
===================================================================
--- libgksu/branches/libgksu2/libgksuui/gksuui-convenience.h 2006-01-07 21:44:47 UTC (rev 498)
+++ libgksu/branches/libgksu2/libgksuui/gksuui-convenience.h 2006-01-07 21:46:38 UTC (rev 499)
@@ -1,33 +0,0 @@
-/*
- * libgksuui -- Gtk+ widget and convenience functions for requesting passwords
- * Copyright (C) 2004 Gustavo Noronha Silva
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GKSU_CONVENIENCE_UI_H__
-#define __GKSU_CONVENIENCE_UI_H__
-
-#include <gtk/gtk.h>
-
-G_BEGIN_DECLS
-
-gchar*
-gksu_ask_password (gchar *title, gchar *message, gboolean grab);
-
-G_END_DECLS
-
-#endif
Deleted: libgksu/branches/libgksu2/libgksuui/libgksuui.ver
===================================================================
--- libgksu/branches/libgksu2/libgksuui/libgksuui.ver 2006-01-07 21:44:47 UTC (rev 498)
+++ libgksu/branches/libgksu2/libgksuui/libgksuui.ver 2006-01-07 21:46:38 UTC (rev 499)
@@ -1,12 +0,0 @@
-HIDDEN {
- local:
- __*;
- _rest*;
- _save*;
-};
-
-LIBGKSUUI_1_0 {
- global:
- *;
-};
-
Deleted: libgksu/branches/libgksu2/libgksuui/libgksuui1.1.pc.in
===================================================================
Modified: libgksu/branches/libgksu2/libgksuui/test-gksuui.c
===================================================================
--- libgksu/branches/libgksu2/libgksuui/test-gksuui.c 2006-01-07 21:44:47 UTC (rev 498)
+++ libgksu/branches/libgksu2/libgksuui/test-gksuui.c 2006-01-07 21:46:38 UTC (rev 499)
@@ -1,5 +1,5 @@
/*
- * libgksuui -- Gtk+ widget and convenience functions for requesting passwords
+ * libgksuui -- Gtk+ widget for requesting passwords
* Copyright (C) 2004 Gustavo Noronha Silva
*
* This library is free software; you can redistribute it and/or
@@ -23,7 +23,6 @@
#include <gtk/gtk.h>
#include "gksuui-dialog.h"
-#include "gksuui-convenience.h"
int
main (gint argc, gchar **argv)
@@ -55,8 +54,5 @@
while (gtk_events_pending ())
gtk_main_iteration_do (FALSE);
- password = gksu_ask_password (NULL, NULL, TRUE);
- fprintf (stderr, "password: %s\n", password);
-
return 0;
}
- Previous message: kov changed libgksu/branches/libgksu2/aclocal.m4
- Next message: kov changed libgksu/branches/libgksu2/ChangeLog,
libgksu/branches/libgksu2/Makefile.am,
libgksu/branches/libgksu2/aclocal.m4,
libgksu/branches/libgksu2/config.h.in,
libgksu/branches/libgksu2/configure.ac,
libgksu/branches/libgksu2/intl/,
libgksu/branches/libgksu2/intltool-extract.in,
libgksu/branches/libgksu2/po/POTFILES.in,
libgksu/branches/libgksu2/po/ca.po,
libgksu/branches/libgksu2/po/cs.po,
libgksu/branches/libgksu2/po/da.po,
libgksu/branches/libgksu2/po/de.po,
libgksu/branches/libgksu2/po/es.po,
libgksu/branches/libgksu2/po/eu.po,
libgksu/branches/libgksu2/po/hu.po,
libgksu/branches/libgksu2/po/nb.po,
libgksu/branches/libgksu2/po/nl.po,
libgksu/branches/libgksu2/po/pl.po,
libgksu/branches/libgksu2/po/pt_BR.po,
libgksu/branches/libgksu2/po/ro.po,
libgksu/branches/libgksu2/po/ru.po,
libgksu/branches/libgksu2/po/sk.po
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the gksu-commits
mailing list