[gdm-list] [PATCH] 64bit compilation and gnome-screensaver
- From: Rodrigo Moya <rodrigo novell com>
- To: gdm-list gnome org
- Subject: [gdm-list] [PATCH] 64bit compilation and gnome-screensaver
- Date: Thu, 22 Sep 2005 11:33:54 +0200
Hi
Two patches attached, first one (in gdmphotosetup.c) is for fixing
warnings and errors on 64bit compilation.
The second one has been in my tree for some time now, not sure if I
already sent it, but seems not, so sending it here. It just makes use of
gnome-screensaver instead of xscreensaver if available.
Ok to commit?
--
Rodrigo Moya <rodrigo novell com>
? docs/es/.xml2po.mo
? m4/intltool.m4
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gdm2/ChangeLog,v
retrieving revision 1.1216
diff -u -p -r1.1216 ChangeLog
--- ChangeLog 21 Sep 2005 04:10:22 -0000 1.1216
+++ ChangeLog 22 Sep 2005 09:34:27 -0000
@@ -1,3 +1,15 @@
+2005-09-22 Rodrigo Moya <rodrigo novell com>
+
+ * gui/gdmflexiserver.c (run_again): use gnome-screensaver if
+ available instead of xscreensaver.
+
+2005-09-22 Rodrigo Moya <rodrigo novell com>
+
+ * gui/gdmphotosetup.c: fixed compilation warnings.
+ (add_preview_widget): made it static to avoid 'no previous prototype'
+ warning.
+ (browse_button_cb, fill_model): removed unused variables.
+
2005-09-20 Brian Cameron <Brian Cameron sun com>
* README.install, pam_allow.c: Add documentation
Index: gui/gdmflexiserver.c
===================================================================
RCS file: /cvs/gnome/gdm2/gui/gdmflexiserver.c,v
retrieving revision 1.32
diff -u -p -r1.32 gdmflexiserver.c
--- gui/gdmflexiserver.c 26 Aug 2005 04:29:10 -0000 1.32
+++ gui/gdmflexiserver.c 22 Sep 2005 09:34:27 -0000
@@ -393,14 +393,26 @@ run_again:
/* we switched to a different screen as a result of this,
* lock the current screen */
if ( ! no_lock && vt != get_cur_vt () && vt >= 0) {
- char *argv[3] = {"xscreensaver-command",
- "-lock", NULL};
+ char *argv[3], *path, *throttle_arg;
+
+ if ((path = g_find_program_in_path ("gnome-screensaver-command"))) {
+ argv[0] = "gnome-screensaver-command";
+ argv[1] = "--lock";
+ argv[2] = NULL;
+ throttle_arg = "--throttle";
+ g_free (path);
+ } else {
+ argv[0] = "xscreensaver-command";
+ argv[1] = "-lock";
+ argv[2] = NULL;
+ throttle_arg = "-throttle";
+ }
if (gnome_execute_async (g_get_home_dir (),
2, argv) < 0)
g_warning (_("Can't lock screen"));
- argv[1] = "-throttle";
+ argv[1] = throttle_arg;
if (gnome_execute_async (g_get_home_dir (),
2, argv) < 0)
@@ -807,7 +819,21 @@ main (int argc, char *argv[])
/* if we switched to a different screen as a result of this,
* lock the current screen */
if ( ! no_lock && ! use_xnest) {
- char *argv[3] = {"xscreensaver-command", "-lock", NULL};
+ char *argv[3], *path, *throttle_arg;
+
+ if ((path = g_find_program_in_path ("gnome-screensaver-command"))) {
+ argv[0] = "gnome-screensaver-command";
+ argv[1] = "--lock";
+ argv[2] = NULL;
+ throttle_arg = "--throttle";
+ g_free (path);
+ } else {
+ argv[0] = "xscreensaver-command";
+ argv[1] = "-lock";
+ argv[2] = NULL;
+ throttle_arg = "-throttle";
+ }
+
if (gnome_execute_async (g_get_home_dir (), 2, argv) < 0)
g_warning (_("Can't lock screen"));
argv[1] = "-throttle";
Index: gui/gdmphotosetup.c
===================================================================
RCS file: /cvs/gnome/gdm2/gui/gdmphotosetup.c,v
retrieving revision 1.49
diff -u -p -r1.49 gdmphotosetup.c
--- gui/gdmphotosetup.c 7 Sep 2005 00:48:10 -0000 1.49
+++ gui/gdmphotosetup.c 22 Sep 2005 09:34:27 -0000
@@ -201,7 +201,7 @@ install_response (GtkWidget *file_dialog
gtk_widget_destroy (file_dialog);
}
-void
+static void
add_preview_widget (GtkWidget *widget)
{
GtkWidget *vbox;
@@ -232,7 +232,6 @@ browse_button_cb (GtkWidget *widget, gpo
GSList *l;
GtkWidget *file_dialog;
GSList *filters = NULL;
- GtkWidget *vbox;
file_dialog = gtk_file_chooser_dialog_new (_("Select Image"),
parent,
@@ -362,8 +361,6 @@ static void
fill_model (GtkTreeModel *model)
{
GdkPixbuf *pixbuf;
- int i;
- char *str, *str2;
GtkTreeIter iter;
GtkListStore *store = GTK_LIST_STORE (model);
GDir *dir;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]