Commit 49dfa78e authored by Tim Janik's avatar Tim Janik Committed by Tim Janik

use g_get_current_dir() instead of getcwd().

Tue Aug 18 17:54:40 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkrc.c (gtk_rc_parse_file): use g_get_current_dir() instead of
        getcwd().

        * gdk/gdkprivate.h:
        * gdk/gdkglobals.c:
        * gdk/gdkwindow.c:
        * gdk/gdk.c:
        * gtk/gtkwindow.c:
        * gtk/gtkitemfactory.c:
        dropped gdk_progname, use g_get_prgname()/g_set_prgname() instead.

        * gtk/gtkselection.c:
        * gtk/gtkpreview.c:
        * gtk/gtkobject.c:
        * gtk/gtkmain.c:
        * gtk/gtktypeutils.c: indentation fixes due to g_message() use.

        * gdk/gdkrgb.c: exchanged occourances of g_print with g_message.
parent 1575a19c
Tue Aug 18 17:54:40 1998 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_parse_file): use g_get_current_dir() instead of
getcwd().
* gdk/gdkprivate.h:
* gdk/gdkglobals.c:
* gdk/gdkwindow.c:
* gdk/gdk.c:
* gtk/gtkwindow.c:
* gtk/gtkitemfactory.c:
dropped gdk_progname, use g_get_prgname()/g_set_prgname() instead.
* gtk/gtkselection.c:
* gtk/gtkpreview.c:
* gtk/gtkobject.c:
* gtk/gtkmain.c:
* gtk/gtktypeutils.c: indentation fixes due to g_message() use.
* gdk/gdkrgb.c: exchanged occourances of g_print with g_message.
Tue Aug 18 17:22:22 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_switch_focus_tab):
......@@ -35,8 +56,6 @@ Tue Aug 18 03:54:43 1998 Tim Janik <timj@gtk.org>
purposes in a sane way, avoiding all the nasty #ifdef DEBUG_MY_TEDDY
things.
* gdk/gdkrgb.c: left this out currently.
* gdk/gdkdnd.c: added copyright notice.
Mon Aug 17 17:28:00 Raph Levien <raph@gtk.org>
......
Tue Aug 18 17:54:40 1998 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_parse_file): use g_get_current_dir() instead of
getcwd().
* gdk/gdkprivate.h:
* gdk/gdkglobals.c:
* gdk/gdkwindow.c:
* gdk/gdk.c:
* gtk/gtkwindow.c:
* gtk/gtkitemfactory.c:
dropped gdk_progname, use g_get_prgname()/g_set_prgname() instead.
* gtk/gtkselection.c:
* gtk/gtkpreview.c:
* gtk/gtkobject.c:
* gtk/gtkmain.c:
* gtk/gtktypeutils.c: indentation fixes due to g_message() use.
* gdk/gdkrgb.c: exchanged occourances of g_print with g_message.
Tue Aug 18 17:22:22 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_switch_focus_tab):
......@@ -35,8 +56,6 @@ Tue Aug 18 03:54:43 1998 Tim Janik <timj@gtk.org>
purposes in a sane way, avoiding all the nasty #ifdef DEBUG_MY_TEDDY
things.
* gdk/gdkrgb.c: left this out currently.
* gdk/gdkdnd.c: added copyright notice.
Mon Aug 17 17:28:00 Raph Levien <raph@gtk.org>
......
Tue Aug 18 17:54:40 1998 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_parse_file): use g_get_current_dir() instead of
getcwd().
* gdk/gdkprivate.h:
* gdk/gdkglobals.c:
* gdk/gdkwindow.c:
* gdk/gdk.c:
* gtk/gtkwindow.c:
* gtk/gtkitemfactory.c:
dropped gdk_progname, use g_get_prgname()/g_set_prgname() instead.
* gtk/gtkselection.c:
* gtk/gtkpreview.c:
* gtk/gtkobject.c:
* gtk/gtkmain.c:
* gtk/gtktypeutils.c: indentation fixes due to g_message() use.
* gdk/gdkrgb.c: exchanged occourances of g_print with g_message.
Tue Aug 18 17:22:22 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_switch_focus_tab):
......@@ -35,8 +56,6 @@ Tue Aug 18 03:54:43 1998 Tim Janik <timj@gtk.org>
purposes in a sane way, avoiding all the nasty #ifdef DEBUG_MY_TEDDY
things.
* gdk/gdkrgb.c: left this out currently.
* gdk/gdkdnd.c: added copyright notice.
Mon Aug 17 17:28:00 Raph Levien <raph@gtk.org>
......
Tue Aug 18 17:54:40 1998 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_parse_file): use g_get_current_dir() instead of
getcwd().
* gdk/gdkprivate.h:
* gdk/gdkglobals.c:
* gdk/gdkwindow.c:
* gdk/gdk.c:
* gtk/gtkwindow.c:
* gtk/gtkitemfactory.c:
dropped gdk_progname, use g_get_prgname()/g_set_prgname() instead.
* gtk/gtkselection.c:
* gtk/gtkpreview.c:
* gtk/gtkobject.c:
* gtk/gtkmain.c:
* gtk/gtktypeutils.c: indentation fixes due to g_message() use.
* gdk/gdkrgb.c: exchanged occourances of g_print with g_message.
Tue Aug 18 17:22:22 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_switch_focus_tab):
......@@ -35,8 +56,6 @@ Tue Aug 18 03:54:43 1998 Tim Janik <timj@gtk.org>
purposes in a sane way, avoiding all the nasty #ifdef DEBUG_MY_TEDDY
things.
* gdk/gdkrgb.c: left this out currently.
* gdk/gdkdnd.c: added copyright notice.
Mon Aug 17 17:28:00 Raph Levien <raph@gtk.org>
......
Tue Aug 18 17:54:40 1998 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_parse_file): use g_get_current_dir() instead of
getcwd().
* gdk/gdkprivate.h:
* gdk/gdkglobals.c:
* gdk/gdkwindow.c:
* gdk/gdk.c:
* gtk/gtkwindow.c:
* gtk/gtkitemfactory.c:
dropped gdk_progname, use g_get_prgname()/g_set_prgname() instead.
* gtk/gtkselection.c:
* gtk/gtkpreview.c:
* gtk/gtkobject.c:
* gtk/gtkmain.c:
* gtk/gtktypeutils.c: indentation fixes due to g_message() use.
* gdk/gdkrgb.c: exchanged occourances of g_print with g_message.
Tue Aug 18 17:22:22 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_switch_focus_tab):
......@@ -35,8 +56,6 @@ Tue Aug 18 03:54:43 1998 Tim Janik <timj@gtk.org>
purposes in a sane way, avoiding all the nasty #ifdef DEBUG_MY_TEDDY
things.
* gdk/gdkrgb.c: left this out currently.
* gdk/gdkdnd.c: added copyright notice.
Mon Aug 17 17:28:00 Raph Levien <raph@gtk.org>
......
Tue Aug 18 17:54:40 1998 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_parse_file): use g_get_current_dir() instead of
getcwd().
* gdk/gdkprivate.h:
* gdk/gdkglobals.c:
* gdk/gdkwindow.c:
* gdk/gdk.c:
* gtk/gtkwindow.c:
* gtk/gtkitemfactory.c:
dropped gdk_progname, use g_get_prgname()/g_set_prgname() instead.
* gtk/gtkselection.c:
* gtk/gtkpreview.c:
* gtk/gtkobject.c:
* gtk/gtkmain.c:
* gtk/gtktypeutils.c: indentation fixes due to g_message() use.
* gdk/gdkrgb.c: exchanged occourances of g_print with g_message.
Tue Aug 18 17:22:22 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_switch_focus_tab):
......@@ -35,8 +56,6 @@ Tue Aug 18 03:54:43 1998 Tim Janik <timj@gtk.org>
purposes in a sane way, avoiding all the nasty #ifdef DEBUG_MY_TEDDY
things.
* gdk/gdkrgb.c: left this out currently.
* gdk/gdkdnd.c: added copyright notice.
Mon Aug 17 17:28:00 Raph Levien <raph@gtk.org>
......
Tue Aug 18 17:54:40 1998 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_parse_file): use g_get_current_dir() instead of
getcwd().
* gdk/gdkprivate.h:
* gdk/gdkglobals.c:
* gdk/gdkwindow.c:
* gdk/gdk.c:
* gtk/gtkwindow.c:
* gtk/gtkitemfactory.c:
dropped gdk_progname, use g_get_prgname()/g_set_prgname() instead.
* gtk/gtkselection.c:
* gtk/gtkpreview.c:
* gtk/gtkobject.c:
* gtk/gtkmain.c:
* gtk/gtktypeutils.c: indentation fixes due to g_message() use.
* gdk/gdkrgb.c: exchanged occourances of g_print with g_message.
Tue Aug 18 17:22:22 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_switch_focus_tab):
......@@ -35,8 +56,6 @@ Tue Aug 18 03:54:43 1998 Tim Janik <timj@gtk.org>
purposes in a sane way, avoiding all the nasty #ifdef DEBUG_MY_TEDDY
things.
* gdk/gdkrgb.c: left this out currently.
* gdk/gdkdnd.c: added copyright notice.
Mon Aug 17 17:28:00 Raph Levien <raph@gtk.org>
......
......@@ -328,9 +328,9 @@ gdk_init (int *argc,
d = strrchr((*argv)[0],'/');
if (d != NULL)
gdk_progname = g_strdup (d + 1);
g_set_prgname (d + 1);
else
gdk_progname = g_strdup ((*argv)[0]);
g_set_prgname ((*argv)[0]);
}
for (i = 1; i < *argc;)
......@@ -406,7 +406,7 @@ gdk_init (int *argc,
if ((i + 1) < *argc && (*argv)[i + 1])
{
(*argv)[i++] = NULL;
gdk_progname = (*argv)[i];
g_set_prgname ((*argv)[i]);
(*argv)[i] = NULL;
}
}
......@@ -494,10 +494,10 @@ gdk_init (int *argc,
}
else
{
gdk_progname = "<unknown>";
g_set_prgname ("<unknown>");
}
GDK_NOTE (MISC, g_message ("progname: \"%s\"", gdk_progname));
GDK_NOTE (MISC, g_message ("progname: \"%s\"", g_get_prgname ()));
gdk_display = XOpenDisplay (gdk_display_name);
if (!gdk_display)
......@@ -527,10 +527,10 @@ gdk_init (int *argc,
gdk_leader_window = XCreateSimpleWindow(gdk_display, gdk_root_window,
10, 10, 10, 10, 0, 0 , 0);
class_hint = XAllocClassHint();
class_hint->res_name = gdk_progname;
class_hint->res_name = g_get_prgname ();
if (gdk_progclass == NULL)
{
gdk_progclass = g_strdup (gdk_progname);
gdk_progclass = g_strdup (g_get_prgname ());
gdk_progclass[0] = toupper (gdk_progclass[0]);
}
class_hint->res_class = gdk_progclass;
......@@ -1824,10 +1824,14 @@ gdk_event_translate (GdkEvent *event,
if (window != NULL)
gdk_window_ref (window);
else if(gdk_null_window_warnings) /* Special purpose programs that
get events for other windows may
want to disable this */
g_warning ("%#lx -> NULL\n", xevent->xany.window);
else if (gdk_null_window_warnings)
{
/* Special purpose programs that
* get events for other windows may
* want to disable this
*/
g_warning ("xwindow(%#lx) lookup reveals NULL", xevent->xany.window);
}
/* Check for filters for this window */
......
......@@ -48,7 +48,6 @@ GdkDndGlobals gdk_dnd = {None,None,None,
{0,0},
{0,0}, {0,0},
{0,0,0,0}, NULL, None, 0};
gchar *gdk_progname = NULL;
gchar *gdk_progclass = NULL;
gint gdk_error_code;
gint gdk_error_warnings = TRUE;
......
......@@ -262,7 +262,6 @@ extern Atom gdk_wm_window_protocols[];
extern Atom gdk_selection_property;
extern GdkDndGlobals gdk_dnd;
extern GdkWindow *selection_owner[];
extern gchar *gdk_progname;
extern gchar *gdk_progclass;
extern gint gdk_error_code;
extern gint gdk_error_warnings;
......
This diff is collapsed.
......@@ -437,7 +437,7 @@ gdk_window_new (GdkWindow *parent,
if (attributes_mask & GDK_WA_TITLE)
title = attributes->title;
else
title = gdk_progname;
title = g_get_prgname ();
XmbSetWMProperties (private->xdisplay, private->xwindow,
title, title,
......
......@@ -48,7 +48,6 @@ GdkDndGlobals gdk_dnd = {None,None,None,
{0,0},
{0,0}, {0,0},
{0,0,0,0}, NULL, None, 0};
gchar *gdk_progname = NULL;
gchar *gdk_progclass = NULL;
gint gdk_error_code;
gint gdk_error_warnings = TRUE;
......
......@@ -328,9 +328,9 @@ gdk_init (int *argc,
d = strrchr((*argv)[0],'/');
if (d != NULL)
gdk_progname = g_strdup (d + 1);
g_set_prgname (d + 1);
else
gdk_progname = g_strdup ((*argv)[0]);
g_set_prgname ((*argv)[0]);
}
for (i = 1; i < *argc;)
......@@ -406,7 +406,7 @@ gdk_init (int *argc,
if ((i + 1) < *argc && (*argv)[i + 1])
{
(*argv)[i++] = NULL;
gdk_progname = (*argv)[i];
g_set_prgname ((*argv)[i]);
(*argv)[i] = NULL;
}
}
......@@ -494,10 +494,10 @@ gdk_init (int *argc,
}
else
{
gdk_progname = "<unknown>";
g_set_prgname ("<unknown>");
}
GDK_NOTE (MISC, g_message ("progname: \"%s\"", gdk_progname));
GDK_NOTE (MISC, g_message ("progname: \"%s\"", g_get_prgname ()));
gdk_display = XOpenDisplay (gdk_display_name);
if (!gdk_display)
......@@ -527,10 +527,10 @@ gdk_init (int *argc,
gdk_leader_window = XCreateSimpleWindow(gdk_display, gdk_root_window,
10, 10, 10, 10, 0, 0 , 0);
class_hint = XAllocClassHint();
class_hint->res_name = gdk_progname;
class_hint->res_name = g_get_prgname ();
if (gdk_progclass == NULL)
{
gdk_progclass = g_strdup (gdk_progname);
gdk_progclass = g_strdup (g_get_prgname ());
gdk_progclass[0] = toupper (gdk_progclass[0]);
}
class_hint->res_class = gdk_progclass;
......@@ -1824,10 +1824,14 @@ gdk_event_translate (GdkEvent *event,
if (window != NULL)
gdk_window_ref (window);
else if(gdk_null_window_warnings) /* Special purpose programs that
get events for other windows may
want to disable this */
g_warning ("%#lx -> NULL\n", xevent->xany.window);
else if (gdk_null_window_warnings)
{
/* Special purpose programs that
* get events for other windows may
* want to disable this
*/
g_warning ("xwindow(%#lx) lookup reveals NULL", xevent->xany.window);
}
/* Check for filters for this window */
......
......@@ -437,7 +437,7 @@ gdk_window_new (GdkWindow *parent,
if (attributes_mask & GDK_WA_TITLE)
title = attributes->title;
else
title = gdk_progname;
title = g_get_prgname ();
XmbSetWMProperties (private->xdisplay, private->xwindow,
title, title,
......
......@@ -29,7 +29,6 @@
#include "gtk/gtkcheckmenuitem.h"
#include "gtk/gtktearoffmenuitem.h"
#include "gtk/gtkaccellabel.h"
#include "gdk/gdkprivate.h" /* for gdk_progname */
#include "gdk/gdkkeysyms.h"
#include <string.h>
#include <sys/stat.h>
......@@ -785,8 +784,8 @@ gtk_item_factory_dump_rc (const gchar *file_name,
return;
fputs ("; ", f_out);
if (gdk_progname)
fputs (gdk_progname, f_out);
if (g_get_prgname ())
fputs (g_get_prgname (), f_out);
fputs (" GtkItemFactory rc-file -*- scheme -*-\n", f_out);
fputs ("; this file is an automated menu-path dump\n", f_out);
fputs (";\n", f_out);
......
......@@ -410,7 +410,7 @@ gtk_init (int *argc,
g_free (current_locale);
GTK_NOTE (MISC,
g_message ("%s multi-byte string functions.\n",
g_message ("%s multi-byte string functions.",
gtk_use_mb ? "Using" : "Not using"));
/* Initialize the default visual and colormap to be
......
......@@ -95,7 +95,7 @@ gtk_object_debug_foreach (gpointer key, gpointer value, gpointer user_data)
GtkObject *object;
object = (GtkObject*) value;
g_message ("[%p] %s\tref_count=%d%s%s\n",
g_message ("[%p] %s\tref_count=%d%s%s",
object,
gtk_type_name (GTK_OBJECT_TYPE (object)),
object->ref_count,
......@@ -107,7 +107,7 @@ gtk_object_debug (void)
{
g_hash_table_foreach (living_objs_ht, gtk_object_debug_foreach, NULL);
g_message ("living objects count = %d\n", obj_count);
g_message ("living objects count = %d", obj_count);
}
#endif /* G_ENABLE_DEBUG */
......
......@@ -1255,8 +1255,8 @@ gtk_trim_cmap (GtkPreviewClass *klass)
if ((nred < 2) || (ngreen < 2) || (nblue < 2) || (ngray < 2))
{
g_message ("Unable to allocate sufficient colormap entries.\n");
g_message ("Try exiting other color intensive applications.\n");
g_message ("Unable to allocate sufficient colormap entries.");
g_message ("Try exiting other color intensive applications.");
return;
}
......@@ -1266,8 +1266,8 @@ gtk_trim_cmap (GtkPreviewClass *klass)
(nblue != klass->info.nblue_shades) ||
(ngray != klass->info.ngray_shades))
{
g_message ("Not enough colors to satisfy requested color cube.\n");
g_message ("Reduced color cube shades from\n");
g_message ("Not enough colors to satisfy requested color cube.");
g_message ("Reduced color cube shades from");
g_message ("[%d of Red, %d of Green, %d of Blue, %d of Gray] ==> [%d of Red, %d of Green, %d of Blue, %d of Gray]\n",
klass->info.nred_shades, klass->info.ngreen_shades,
klass->info.nblue_shades, klass->info.ngray_shades,
......
......@@ -248,16 +248,12 @@ gtk_rc_parse_file (const gchar *filename, gboolean reload)
else
{
GString *str;
gchar buffer[MAXPATHLEN];
#if defined(sun) && !defined(__SVR4)
if(!getwd(buffer))
#else
if(!getcwd(buffer, MAXPATHLEN))
#endif
return;
str = g_string_new (buffer);
gchar *cwd;
cwd = g_get_current_dir ();
str = g_string_new (cwd);
g_free (cwd);
g_string_append_c (str, '/');
g_string_append (str, rc_file->name);
......
......@@ -8,7 +8,7 @@
*
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
......@@ -28,7 +28,7 @@
* guaranteed with the way we do things, since if we are doing INCR
* transfers, the order will depend on the timing of the requestor.
*
* By Owen Taylor <owt1@cornell.edu> 8/16/97
* By Owen Taylor <owt1@cornell.edu> 8/16/97
*/
/* Terminology note: when not otherwise specified, the term "incr" below
......@@ -81,13 +81,13 @@ struct _GtkSelectionInfo
struct _GtkIncrConversion
{
GdkAtom target; /* Requested target */
GdkAtom property; /* Property to store in */
GdkAtom target; /* Requested target */
GdkAtom property; /* Property to store in */
GtkSelectionData data; /* The data being supplied */
gint offset; /* Current offset in sent selection.
gint offset; /* Current offset in sent selection.
* -1 => All done
* -2 => Only the final (empty) portion
* left to send */
* left to send */
};
struct _GtkIncrInfo
......@@ -115,7 +115,7 @@ struct _GtkRetrievalInfo
guint32 idle_time; /* Number of seconds since we last heard
from selection owner */
guchar *buffer; /* Buffer in which to accumulate results */
gint offset; /* Current offset in buffer, -1 indicates
gint offset; /* Current offset in buffer, -1 indicates
not yet started */
};
......@@ -124,21 +124,21 @@ struct _GtkSelectionHandler
GdkAtom selection; /* selection thats handled */
GdkAtom target; /* target thats handled */
GtkSelectionFunction function; /* callback function */
GtkCallbackMarshal marshal; /* Marshalling function */
GtkCallbackMarshal marshal; /* Marshalling function */
gpointer data; /* callback data */
GtkDestroyNotify destroy; /* called when callback is removed */
GtkDestroyNotify destroy; /* called when callback is removed */
};
/* Local Functions */
static void gtk_selection_init (void);
static gint gtk_selection_incr_timeout (GtkIncrInfo *info);
static gint gtk_selection_retrieval_timeout (GtkRetrievalInfo *info);
static void gtk_selection_retrieval_report (GtkRetrievalInfo *info,
static void gtk_selection_init (void);
static gint gtk_selection_incr_timeout (GtkIncrInfo *info);
static gint gtk_selection_retrieval_timeout (GtkRetrievalInfo *info);
static void gtk_selection_retrieval_report (GtkRetrievalInfo *info,
GdkAtom type, gint format,
guchar *buffer, gint length);
static void gtk_selection_invoke_handler (GtkWidget *widget,
static void gtk_selection_invoke_handler (GtkWidget *widget,
GtkSelectionData *data);
static void gtk_selection_default_handler (GtkWidget *widget,
static void gtk_selection_default_handler (GtkWidget *widget,
GtkSelectionData *data);
/* Local Data */
......@@ -256,36 +256,36 @@ gtk_selection_owner_set (GtkWidget *widget,
* Add a handler for a specified selection/target pair
*
* arguments:
* widget: The widget the handler applies to
* widget: The widget the handler applies to
* selection:
* target:
* format: Format in which this handler will return data
* format: Format in which this handler will return data
* function: Callback function (can be NULL)
* marshal: Callback marshal function
* data: User data for callback
* destroy: Called when handler removed
* marshal: Callback marshal function
* data: User data for callback
* destroy: Called when handler removed
*
* results:
*************************************************************/
void
gtk_selection_add_handler (GtkWidget *widget,
GdkAtom selection,
GdkAtom target,
gtk_selection_add_handler (GtkWidget *widget,
GdkAtom selection,
GdkAtom target,
GtkSelectionFunction function,
gpointer data)
gpointer data)
{
gtk_selection_add_handler_full (widget, selection, target, function,
NULL, data, NULL);
}
void
gtk_selection_add_handler_full (GtkWidget *widget,
GdkAtom selection,
GdkAtom target,
gtk_selection_add_handler_full (GtkWidget *widget,
GdkAtom selection,
GdkAtom target,
GtkSelectionFunction function,
GtkCallbackMarshal marshal,
gpointer data,
gpointer data,
GtkDestroyNotify destroy)
{
GList *selection_handlers;
......@@ -443,11 +443,11 @@ gtk_selection_remove_all (GtkWidget *widget)
* a "selection_received" signal will be generated.
*
* arguments:
* widget: The widget which acts as requestor
* widget: The widget which acts as requestor
* selection: Which selection to get
* target: Form of information desired (e.g., STRING)
* time: Time of request (usually of triggering event)
* In emergency, you could use GDK_CURRENT_TIME
* target: Form of information desired (e.g., STRING)
* time: Time of request (usually of triggering event)
* In emergency, you could use GDK_CURRENT_TIME
*
* results:
* TRUE if requested succeeded. FALSE if we could not process
......@@ -457,9 +457,9 @@ gtk_selection_remove_all (GtkWidget *widget)
gint
gtk_selection_convert (GtkWidget *widget,
GdkAtom selection,
GdkAtom target,
guint32 time)
GdkAtom selection,
GdkAtom target,
guint32 time)
{
GtkRetrievalInfo *info;
GList *tmp_list;
......@@ -547,18 +547,18 @@ gtk_selection_convert (GtkWidget *widget,
* Null terminates the stored data.
* arguments:
* type: the type of selection data
* format: format (number of bits in a unit)
* data: pointer to the data (will be copied)
* length: length of the data
* format: format (number of bits in a unit)
* data: pointer to the data (will be copied)
* length: length of the data
* results:
*************************************************************/
void
gtk_selection_data_set (GtkSelectionData *selection_data,
GdkAtom type,
gint format,
guchar *data,
gint length)
GdkAtom type,
gint format,
guchar *data,
gint length)
{
if (selection_data->data)
g_free (selection_data->data);
......@@ -707,7 +707,7 @@ gtk_selection_request (GtkWidget *widget,
if (!gdk_property_get (info->requestor, event->property, GDK_SELECTION_TYPE_ATOM,
0, GTK_SELECTION_MAX_SIZE, FALSE,
&type, &format, &length, &mult_atoms) ||
type != GDK_SELECTION_TYPE_ATOM || format != 8*sizeof(GdkAtom))
type != GDK_SELECTION_TYPE_ATOM || format != 8*sizeof(GdkAtom))
{
gdk_selection_send_notify (event->requestor, event->selection,
event->target, GDK_NONE, event->time);
......@@ -747,10 +747,10 @@ gtk_selection_request (GtkWidget *widget,
data.length = -1;
#ifdef DEBUG_SELECTION
g_message("Selection %ld, target %ld (%s) requested by 0x%x (property = %ld)\n",
event->selection, info->conversions[i].target,
gdk_atom_name(info->conversions[i].target),
event->requestor, event->property);
g_message ("Selection %ld, target %ld (%s) requested by 0x%x (property = %ld)",
event->selection, info->conversions[i].target,
gdk_atom_name(info->conversions[i].target),
event->requestor, event->property);
#endif
gtk_selection_invoke_handler (widget, &data);
......@@ -805,7 +805,7 @@ gtk_selection_request (GtkWidget *widget,
exist */
#ifdef DEBUG_SELECTION
g_message("Starting INCR...\n");
g_message ("Starting INCR...");
#endif
gdk_window_set_events (info->requestor,
......@@ -847,14 +847,14 @@ gtk_selection_request (GtkWidget *widget,
* more data.
*
* arguments:
* window: the requestor window
* event: the property event structure
* window: the requestor window
* event: the property event structure
*
* results:
*************************************************************/
gint
gtk_selection_incr_event (GdkWindow *window,
gtk_selection_incr_event (GdkWindow *window,
GdkEventProperty *event)
{
GList *tmp_list;
......@@ -868,7 +868,7 @@ gtk_selection_incr_event (GdkWindow *window,
return FALSE;
#ifdef DEBUG_SELECTION
g_message("PropertyDelete, property %ld\n", event->atom);
g_message ("PropertyDelete, property %ld", event->atom);
#endif
/* Now find the appropriate ongoing INCR */
......@@ -915,9 +915,9 @@ gtk_selection_incr_event (GdkWindow *window,
info->conversions[i].offset = -2;
}
#ifdef DEBUG_SELECTION
g_message("INCR: put %d bytes (offset = %d) into window 0x%lx , property %ld\n",
num_bytes, info->conversions[i].offset,
GDK_WINDOW_XWINDOW(info->requestor), event->atom);
g_message ("INCR: put %d bytes (offset = %d) into window 0x%lx , property %ld",
num_bytes, info->conversions[i].offset,
GDK_WINDOW_XWINDOW(info->requestor), event->atom);
#endif
gdk_property_change (info->requestor, event->atom,
info->conversions[i].data.type,
......@@ -959,7 +959,7 @@ gtk_selection_incr_event (GdkWindow *window,
* Timeout callback for the sending portion of the INCR
* protocol
* arguments:
* info: Information about this incr
* info: Information about this incr
* results:
*************************************************************/