Lot of little fixes to make it to compile without most of the deprecated stuff
This commit is contained in:
parent
679900bb5f
commit
35e192827a
31 changed files with 254 additions and 124 deletions
|
@ -1,3 +1,14 @@
|
|||
2002-02-04 Lauris Kaplinski <lauris@ximian.com>
|
||||
|
||||
* background-properties-capplet.c (setup_color_widgets): Kill warning
|
||||
(set_background_image_preview): Use g_file_test, use g_object_unref
|
||||
instead of gdk_pixbuf_unref
|
||||
(image_filename_clicked): Use g_signal_connect
|
||||
(dialog_button_clicked_cb): Use GtkDialog instead of GnomeDialog
|
||||
(realize_2_cb): Comment out to kill warning
|
||||
(realize_cb): Ditto
|
||||
(real_realize_cb): Ditto
|
||||
|
||||
2002-01-13 Seth Nickell <snickell@stanford.edu>
|
||||
|
||||
reviewed by: <delete if not using a buddy>
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <gnome.h>
|
||||
#include <gconf/gconf-client.h>
|
||||
#include <glade/glade.h>
|
||||
|
@ -324,6 +325,7 @@ get_legacy_settings (void)
|
|||
* making it feel more natural to the user.
|
||||
*/
|
||||
|
||||
#if 0
|
||||
static gboolean
|
||||
real_realize_cb (BGPreferences *prefs)
|
||||
{
|
||||
|
@ -345,19 +347,24 @@ real_realize_cb (BGPreferences *prefs)
|
|||
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
static gboolean
|
||||
realize_2_cb (BGPreferences *prefs)
|
||||
{
|
||||
gtk_idle_add ((GtkFunction) real_realize_cb, prefs);
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
static void
|
||||
realize_cb (GtkWidget *widget, BGPreferences *prefs)
|
||||
{
|
||||
gtk_timeout_add (100, (GtkFunction) realize_2_cb, prefs);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
setup_color_widgets (int orientation)
|
||||
|
@ -384,6 +391,7 @@ setup_color_widgets (int orientation)
|
|||
color2_string = "Bottom Color";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
@ -440,7 +448,7 @@ set_background_image_preview (const char *filename)
|
|||
g_assert (background_image_label != NULL);
|
||||
g_assert (background_image_preview != NULL);
|
||||
|
||||
if ((filename == NULL) || (!g_file_exists (filename))) {
|
||||
if ((filename == NULL) || (!g_file_test (filename, G_FILE_TEST_EXISTS))) {
|
||||
gtk_label_set_text (GTK_LABEL (background_image_label), "No Picture");
|
||||
gtk_image_set_from_stock (GTK_IMAGE (background_image_preview), GTK_STOCK_MISSING_IMAGE,
|
||||
GTK_ICON_SIZE_DIALOG);
|
||||
|
@ -506,8 +514,8 @@ set_background_image_preview (const char *filename)
|
|||
|
||||
scaled_pixbuf = gdk_pixbuf_scale_simple (pixbuf, width, height, GDK_INTERP_BILINEAR);
|
||||
gtk_image_set_from_pixbuf (GTK_IMAGE (background_image_preview), scaled_pixbuf);
|
||||
gdk_pixbuf_unref (scaled_pixbuf);
|
||||
gdk_pixbuf_unref (pixbuf);
|
||||
g_object_unref (G_OBJECT (scaled_pixbuf));
|
||||
g_object_unref (G_OBJECT (pixbuf));
|
||||
|
||||
length = strlen (filename);
|
||||
|
||||
|
@ -551,17 +559,16 @@ image_filename_clicked (GtkButton *button, gpointer user_data)
|
|||
gtk_file_selection_set_filename (GTK_FILE_SELECTION(file_selector), old_filename);
|
||||
}
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (file_selector), "destroy",
|
||||
GTK_SIGNAL_FUNC(gtk_widget_destroyed),
|
||||
&file_selector);
|
||||
g_signal_connect (G_OBJECT (file_selector), "destroy",
|
||||
(GCallback) gtk_widget_destroyed,
|
||||
&file_selector);
|
||||
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (file_selector)->ok_button),
|
||||
"clicked", GTK_SIGNAL_FUNC (file_selector_cb), file_selector);
|
||||
g_signal_connect (G_OBJECT (GTK_FILE_SELECTION (file_selector)->ok_button),
|
||||
"clicked", (GCallback ) file_selector_cb, file_selector);
|
||||
|
||||
gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION (file_selector)->cancel_button),
|
||||
"clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy),
|
||||
GTK_OBJECT (file_selector));
|
||||
g_signal_connect_swapped (G_OBJECT (GTK_FILE_SELECTION (file_selector)->cancel_button),
|
||||
"clicked", (GCallback ) gtk_widget_destroy, file_selector);
|
||||
|
||||
/* Display that dialog */
|
||||
|
||||
|
@ -674,9 +681,9 @@ create_dialog (BGApplier **bg_appliers)
|
|||
toggle_array[BACKGROUND_TYPE_STRETCHED] = glade_xml_get_widget (dialog, "stretched_toggle");
|
||||
|
||||
for (i = 0; i < NUMBER_BACKGROUND_TYPES; i++) {
|
||||
gtk_signal_connect (GTK_OBJECT (toggle_array[i]),
|
||||
"clicked", GTK_SIGNAL_FUNC (background_type_toggled),
|
||||
toggle_array);
|
||||
g_signal_connect (G_OBJECT (toggle_array[i]),
|
||||
"clicked", (GCallback) background_type_toggled,
|
||||
toggle_array);
|
||||
}
|
||||
|
||||
border_shading_label = glade_xml_get_widget (dialog, "border_shading_label");
|
||||
|
@ -727,7 +734,7 @@ create_dialog (BGApplier **bg_appliers)
|
|||
gtk_box_pack_end (GTK_BOX (widget), bg_applier_get_preview_widget (bg_appliers [BACKGROUND_TYPE_STRETCHED]), TRUE, TRUE, 0);
|
||||
|
||||
widget = glade_xml_get_widget (dialog, "background_image_button");
|
||||
gtk_signal_connect (GTK_OBJECT(widget), "clicked", GTK_SIGNAL_FUNC (image_filename_clicked), NULL);
|
||||
g_signal_connect (G_OBJECT (widget), "clicked", (GCallback) image_filename_clicked, NULL);
|
||||
|
||||
background_image_preview = glade_xml_get_widget (dialog, "background_image_preview");
|
||||
|
||||
|
@ -747,7 +754,7 @@ idle_draw (gpointer data)
|
|||
}
|
||||
|
||||
static void
|
||||
dialog_button_clicked_cb (GnomeDialog *dialog, gint response_id, GConfChangeSet *changeset)
|
||||
dialog_button_clicked_cb (GtkDialog *dialog, gint response_id, GConfChangeSet *changeset)
|
||||
{
|
||||
switch (response_id) {
|
||||
case GTK_RESPONSE_CLOSE:
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2002-02-04 Lauris Kaplinski <lauris@ximian.com>
|
||||
|
||||
* gnome-default-applications-properties.c (initialize_default_applications):
|
||||
Use glib methods instead of deprecated libgnome ones
|
||||
|
||||
2002-01-19 Seth Nickell <snickell@stanford.edu>
|
||||
|
||||
* Makefile.am:
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <gnome.h>
|
||||
#include <gconf/gconf-client.h>
|
||||
#include <glade/glade.h>
|
||||
|
@ -75,19 +76,19 @@ initialize_default_applications (void)
|
|||
gint i;
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (possible_editors); i++ ) {
|
||||
if (gnome_is_program_in_path (possible_editors[i].executable_name))
|
||||
if (g_find_program_in_path (possible_editors[i].executable_name))
|
||||
possible_editors[i].in_path = TRUE;
|
||||
}
|
||||
for (i = 0; i < G_N_ELEMENTS (possible_browsers); i++ ) {
|
||||
if (gnome_is_program_in_path (possible_browsers[i].executable_name))
|
||||
if (g_find_program_in_path (possible_browsers[i].executable_name))
|
||||
possible_browsers[i].in_path = TRUE;
|
||||
}
|
||||
for (i = 0; i < G_N_ELEMENTS (possible_help_viewers); i++ ) {
|
||||
if (gnome_is_program_in_path (possible_help_viewers[i].executable_name))
|
||||
if (g_find_program_in_path (possible_help_viewers[i].executable_name))
|
||||
possible_help_viewers[i].in_path = TRUE;
|
||||
}
|
||||
for (i = 0; i < G_N_ELEMENTS (possible_terminals); i++ ) {
|
||||
if (gnome_is_program_in_path (possible_terminals[i].exec))
|
||||
if (g_find_program_in_path (possible_terminals[i].exec))
|
||||
possible_terminals[i].in_path = TRUE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,17 @@
|
|||
2002-02-04 Lauris Kaplinski <lauris@ximian.com>
|
||||
|
||||
* service-edit-dialog.c (setup_add_dialog): Use gtk_menu_shell_append
|
||||
(validate_data): Use gtk_message_dialog methods
|
||||
|
||||
* mime-category-edit-dialog.c (populate_application_list): Use
|
||||
gtk_menu_shell_append
|
||||
|
||||
* mime-edit-dialog.c (setup_add_dialog): Use gtk_menu_shell_append
|
||||
(validate_data): Use gtk_message_dialog methods
|
||||
|
||||
* mime-type-info.c: #include <string.h>, kill warning
|
||||
(mime_type_info_get_icon_path): Use g_file_test
|
||||
|
||||
2002-01-29 Bradford Hovinen <hovinen@ximian.com>
|
||||
|
||||
* file-types-capplet.c (create_dialog): Pack the icon and
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <glade/glade.h>
|
||||
#include <libgnomevfs/gnome-vfs-application-registry.h>
|
||||
#include <libgnomevfs/gnome-vfs-mime-handlers.h>
|
||||
|
@ -332,14 +333,14 @@ populate_application_list (MimeCategoryEditDialog *dialog)
|
|||
"app", app,
|
||||
(GDestroyNotify) gnome_vfs_mime_application_free);
|
||||
|
||||
gtk_menu_append (menu, menu_item);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
|
||||
gtk_widget_show (menu_item);
|
||||
}
|
||||
|
||||
dialog->p->default_action_active = !(i == 0);
|
||||
dialog->p->custom_action = (found_idx < 0);
|
||||
|
||||
gtk_menu_append (menu, gtk_menu_item_new_with_label (_("Custom")));
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), gtk_menu_item_new_with_label (_("Custom")));
|
||||
|
||||
if (found_idx < 0) {
|
||||
found_idx = i;
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <glade/glade.h>
|
||||
#include <libgnomevfs/gnome-vfs-mime-handlers.h>
|
||||
#include <libgnomevfs/gnome-vfs-application-registry.h>
|
||||
|
@ -385,12 +386,12 @@ setup_add_dialog (MimeEditDialog *dialog)
|
|||
|
||||
item = gtk_menu_item_new_with_label (_("None"));
|
||||
menu = gtk_menu_new ();
|
||||
gtk_menu_append (GTK_MENU (menu), item);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
|
||||
gtk_option_menu_set_menu (GTK_OPTION_MENU (WID ("component_select")), menu);
|
||||
|
||||
item = gtk_menu_item_new_with_label (_("Custom"));
|
||||
menu = gtk_menu_new ();
|
||||
gtk_menu_append (GTK_MENU (menu), item);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
|
||||
gtk_option_menu_set_menu (GTK_OPTION_MENU (WID ("default_action_select")), menu);
|
||||
|
||||
gtk_widget_set_sensitive (WID ("component_box"), FALSE);
|
||||
|
@ -432,14 +433,14 @@ populate_component_list (MimeEditDialog *dialog)
|
|||
g_object_set_data (G_OBJECT (menu_item),
|
||||
"component", info);
|
||||
|
||||
gtk_menu_append (menu, menu_item);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
|
||||
gtk_widget_show (menu_item);
|
||||
}
|
||||
|
||||
dialog->p->component_active = !(i == 0);
|
||||
|
||||
menu_item = gtk_menu_item_new_with_label (_("None"));
|
||||
gtk_menu_append (menu, menu_item);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
|
||||
gtk_widget_show (menu_item);
|
||||
|
||||
if (found_idx < 0)
|
||||
|
@ -481,14 +482,14 @@ populate_application_list (MimeEditDialog *dialog)
|
|||
"app", app,
|
||||
(GDestroyNotify) gnome_vfs_mime_application_free);
|
||||
|
||||
gtk_menu_append (menu, menu_item);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
|
||||
gtk_widget_show (menu_item);
|
||||
}
|
||||
|
||||
dialog->p->default_action_active = !(i == 0);
|
||||
dialog->p->custom_action = (found_idx < 0);
|
||||
|
||||
gtk_menu_append (menu, gtk_menu_item_new_with_label (_("Custom")));
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), gtk_menu_item_new_with_label (_("Custom")));
|
||||
|
||||
if (found_idx < 0) {
|
||||
found_idx = i;
|
||||
|
@ -666,19 +667,21 @@ validate_data (MimeEditDialog *dialog)
|
|||
|
||||
if (tmp != NULL && *tmp != '\0') {
|
||||
if (strchr (tmp, ' ') || !strchr (tmp, '/')) {
|
||||
err_dialog = gnome_error_dialog_parented
|
||||
(_("Invalid MIME type. Please enter a valid MIME type, or "
|
||||
"leave the field blank to have one generated for you."),
|
||||
GTK_WINDOW (dialog->p->dialog_win));
|
||||
err_dialog = gtk_message_dialog_new (GTK_WINDOW (dialog->p->dialog_win),
|
||||
0, GTK_MESSAGE_ERROR,
|
||||
GTK_BUTTONS_OK,
|
||||
_("Invalid MIME type. Please enter a valid MIME type, or "
|
||||
"leave the field blank to have one generated for you."));
|
||||
|
||||
gtk_window_set_modal (GTK_WINDOW (err_dialog), TRUE);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
else if (dialog->p->is_add && (gnome_vfs_mime_type_is_known (tmp) || get_mime_type_info (tmp) != NULL)) {
|
||||
err_dialog = gnome_error_dialog_parented
|
||||
(_("There already exists a MIME type of that name."),
|
||||
GTK_WINDOW (dialog->p->dialog_win));
|
||||
err_dialog = gtk_message_dialog_new (GTK_WINDOW (dialog->p->dialog_win),
|
||||
0, GTK_MESSAGE_ERROR,
|
||||
GTK_BUTTONS_OK,
|
||||
_("There already exists a MIME type of that name."));
|
||||
|
||||
gtk_window_set_modal (GTK_WINDOW (err_dialog), TRUE);
|
||||
|
||||
|
@ -752,7 +755,7 @@ choose_cat_cb (MimeEditDialog *dialog)
|
|||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||
NULL);
|
||||
|
||||
gtk_widget_set_usize (dialog_win, 300, 300);
|
||||
gtk_widget_set_size_request (dialog_win, 300, 300);
|
||||
|
||||
scrolled_win = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <bonobo.h>
|
||||
#include <libgnomevfs/gnome-vfs-application-registry.h>
|
||||
#include <libgnomevfs/gnome-vfs-utils.h>
|
||||
|
@ -141,7 +142,7 @@ mime_type_info_get_icon_path (MimeTypeInfo *info)
|
|||
if (info->icon_name == NULL)
|
||||
info->icon_name = g_strdup (gnome_vfs_mime_get_icon (info->mime_type));
|
||||
|
||||
if (g_file_exists (info->icon_name)) {
|
||||
if (g_file_test (info->icon_name, G_FILE_TEST_EXISTS)) {
|
||||
info->icon_path = g_strdup (info->icon_name);
|
||||
return info->icon_path;
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <glade/glade.h>
|
||||
#include <gconf/gconf-client.h>
|
||||
#include <libgnomevfs/gnome-vfs-method.h>
|
||||
|
@ -349,7 +350,7 @@ setup_add_dialog (ServiceEditDialog *dialog)
|
|||
|
||||
item = gtk_menu_item_new_with_label (_("Custom"));
|
||||
menu = gtk_menu_new ();
|
||||
gtk_menu_append (GTK_MENU (menu), item);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
|
||||
gtk_option_menu_set_menu (GTK_OPTION_MENU (WID ("program_select")), menu);
|
||||
|
||||
gtk_widget_set_sensitive (WID ("program_select"), FALSE);
|
||||
|
@ -387,7 +388,7 @@ populate_app_list (ServiceEditDialog *dialog)
|
|||
item = gtk_menu_item_new_with_label (app->name);
|
||||
g_object_set_data_full (G_OBJECT (item), "app", app, (GDestroyNotify) gnome_vfs_mime_application_free);
|
||||
gtk_widget_show (item);
|
||||
gtk_menu_append (menu, item);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
|
||||
|
||||
service_apps = service_apps->next;
|
||||
i++;
|
||||
|
@ -395,7 +396,7 @@ populate_app_list (ServiceEditDialog *dialog)
|
|||
|
||||
item = gtk_menu_item_new_with_label (_("Custom"));
|
||||
gtk_widget_show (item);
|
||||
gtk_menu_append (menu, item);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
|
||||
|
||||
if (found_idx < 0) {
|
||||
if (dialog->p->info->app != NULL) {
|
||||
|
@ -477,14 +478,15 @@ validate_data (ServiceEditDialog *dialog)
|
|||
{
|
||||
const gchar *tmp, *tmp1;
|
||||
gchar *dir;
|
||||
GtkWidget *err_dialog;
|
||||
GtkWidget *err_dialog = NULL;
|
||||
|
||||
tmp = gtk_entry_get_text (GTK_ENTRY (WID ("protocol_entry")));
|
||||
|
||||
if (tmp == NULL || *tmp == '\0') {
|
||||
err_dialog = gnome_error_dialog_parented
|
||||
(_("Please enter a protocol name."),
|
||||
GTK_WINDOW (dialog->p->dialog_win));
|
||||
err_dialog = gtk_message_dialog_new (GTK_WINDOW (dialog->p->dialog_win),
|
||||
0, GTK_MESSAGE_ERROR,
|
||||
GTK_BUTTONS_OK,
|
||||
_("Please enter a protocol name."));
|
||||
|
||||
gtk_window_set_modal (GTK_WINDOW (err_dialog), TRUE);
|
||||
|
||||
|
@ -493,9 +495,11 @@ validate_data (ServiceEditDialog *dialog)
|
|||
for (tmp1 = tmp; *tmp1 != '\0' && isalnum (*tmp1); tmp1++);
|
||||
|
||||
if (*tmp1 != '\0') {
|
||||
err_dialog = gnome_error_dialog_parented
|
||||
(_("Invalid protocol name. Please enter a protocol name without any spaces or punctuation."),
|
||||
GTK_WINDOW (dialog->p->dialog_win));
|
||||
err_dialog =
|
||||
gtk_message_dialog_new (GTK_WINDOW (dialog->p->dialog_win),
|
||||
0, GTK_MESSAGE_ERROR,
|
||||
GTK_BUTTONS_OK,
|
||||
_("Invalid protocol name. Please enter a protocol name without any spaces or punctuation."));
|
||||
|
||||
gtk_window_set_modal (GTK_WINDOW (err_dialog), TRUE);
|
||||
|
||||
|
@ -505,9 +509,10 @@ validate_data (ServiceEditDialog *dialog)
|
|||
if (dialog->p->is_add) {
|
||||
dir = g_strconcat ("/desktop/gnome/url-handlers/", tmp, NULL);
|
||||
if (get_service_info (tmp) || gconf_client_dir_exists (gconf_client_get_default (), dir, NULL)) {
|
||||
err_dialog = gnome_error_dialog_parented
|
||||
(_("There is already a protocol by that name."),
|
||||
GTK_WINDOW (dialog->p->dialog_win));
|
||||
gtk_message_dialog_new (GTK_WINDOW (dialog->p->dialog_win),
|
||||
0, GTK_MESSAGE_ERROR,
|
||||
GTK_BUTTONS_OK,
|
||||
_("There is already a protocol by that name."));
|
||||
|
||||
gtk_window_set_modal (GTK_WINDOW (err_dialog), TRUE);
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <gconf/gconf-client.h>
|
||||
#include <libgnomevfs/gnome-vfs-application-registry.h>
|
||||
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
2002-02-04 Lauris Kaplinski <lauris@ximian.com>
|
||||
|
||||
* gnome-mouse-properties.c (drawing_area_expose_event): Kill warning
|
||||
(dialog_button_clicked_cb): Use G_TYPE_STRING
|
||||
(dialog_button_clicked_cb): Use GtkDialog
|
||||
|
||||
Tue Jan 8 15:47:24 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* .cvsignore: New ignores.
|
||||
|
|
|
@ -225,8 +225,7 @@ drawing_area_expose_event (GtkWidget *widget,
|
|||
GConfChangeSet *changeset)
|
||||
{
|
||||
static gboolean first_time = TRUE;
|
||||
|
||||
GdkPixbuf *pixbuf;
|
||||
GdkPixbuf *pixbuf = NULL;
|
||||
|
||||
if (first_time) {
|
||||
gdk_window_set_events (widget->window, gdk_window_get_events (widget->window) | GDK_BUTTON_PRESS_MASK);
|
||||
|
@ -348,7 +347,7 @@ setup_dialog (GladeXML *dialog, GConfChangeSet *changeset)
|
|||
|
||||
/* Cursors page */
|
||||
tree_view = WID ("cursor_tree");
|
||||
model = (GtkTreeModel *) gtk_list_store_new (N_COLUMNS, GDK_TYPE_PIXBUF, GTK_TYPE_STRING);
|
||||
model = (GtkTreeModel *) gtk_list_store_new (N_COLUMNS, GDK_TYPE_PIXBUF, G_TYPE_STRING);
|
||||
gtk_tree_view_set_model (GTK_TREE_VIEW (tree_view), model);
|
||||
column = gtk_tree_view_column_new ();
|
||||
renderer = gtk_cell_renderer_pixbuf_new ();
|
||||
|
@ -447,7 +446,7 @@ create_dialog (void)
|
|||
/* Callback issued when a button is clicked on the dialog */
|
||||
|
||||
static void
|
||||
dialog_button_clicked_cb (GnomeDialog *dialog, gint response_id, GConfChangeSet *changeset)
|
||||
dialog_button_clicked_cb (GtkDialog *dialog, gint response_id, GConfChangeSet *changeset)
|
||||
{
|
||||
switch (response_id) {
|
||||
case GTK_RESPONSE_APPLY:
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
2002-02-04 Lauris Kaplinski <lauris@ximian.com>
|
||||
|
||||
* sound-properties-capplet.c (create_dialog): Use g_object_set_data,
|
||||
use g_signal_connect
|
||||
(dialog_button_clicked_cb): GtkDialog instead of GnomeDialog
|
||||
(create_dialog): Use gtk_widget_set_size_request
|
||||
|
||||
2002-01-27 Seth Nickell <snickell@stanford.edu>
|
||||
|
||||
* sound.desktop.in:
|
||||
|
|
|
@ -57,7 +57,7 @@ create_dialog (void)
|
|||
|
||||
data = glade_xml_new (GNOMECC_DATA_DIR "/interfaces/sound-properties.glade", "prefs_widget", NULL);
|
||||
widget = glade_xml_get_widget (data, "prefs_widget");
|
||||
gtk_object_set_data (GTK_OBJECT (widget), "glade-data", data);
|
||||
g_object_set_data (G_OBJECT (widget), "glade-data", data);
|
||||
|
||||
props = sound_properties_new ();
|
||||
sound_properties_add_defaults (props, NULL);
|
||||
|
@ -65,11 +65,10 @@ create_dialog (void)
|
|||
gtk_box_pack_start (GTK_BOX (box), sound_view_new (props),
|
||||
TRUE, TRUE, 0);
|
||||
|
||||
gtk_signal_connect_object (GTK_OBJECT (widget), "destroy",
|
||||
GTK_SIGNAL_FUNC (gtk_object_destroy),
|
||||
GTK_OBJECT (props));
|
||||
g_signal_connect_swapped (G_OBJECT (widget), "destroy",
|
||||
(GCallback) gtk_object_destroy, props);
|
||||
|
||||
gtk_widget_set_usize (widget, -1, 250);
|
||||
gtk_widget_set_size_request (widget, -1, 250);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
@ -112,7 +111,7 @@ get_legacy_settings (void)
|
|||
}
|
||||
|
||||
static void
|
||||
dialog_button_clicked_cb (GnomeDialog *dialog, gint response_id, GConfChangeSet *changeset)
|
||||
dialog_button_clicked_cb (GtkDialog *dialog, gint response_id, GConfChangeSet *changeset)
|
||||
{
|
||||
switch (response_id) {
|
||||
case GTK_RESPONSE_APPLY:
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
2002-02-04 Lauris Kaplinski <lauris@ximian.com>
|
||||
|
||||
* main.c (themes_list_refresh): Use g_path_get_basename
|
||||
(get_selected_theme_name): Ditto
|
||||
(install_cb): Use g_signal_connect
|
||||
|
||||
* control/control.c (create_form): Use gtk_menu_shell_append
|
||||
(create_form): Use gtk_radio_button_get_group,
|
||||
set entry max length explicitly
|
||||
|
||||
2002-01-28 Richard Hestilow <hestilow@ximian.com>
|
||||
|
||||
* main.c: Include gconf-client.h, add trailing NULLs to all
|
||||
|
|
|
@ -48,9 +48,10 @@ create_form (void)
|
|||
hbox = gtk_hbox_new (FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
|
||||
gtk_table_attach (GTK_TABLE (table), hbox, 0, 1, 3, 4, GTK_EXPAND | GTK_FILL, 0, GNOME_PAD_SMALL, 0);
|
||||
widget = gtk_entry_new_with_max_length (50);
|
||||
widget = gtk_entry_new ();
|
||||
gtk_entry_set_max_length (GTK_ENTRY (widget), 50);
|
||||
gtk_entry_set_text (GTK_ENTRY (widget), _("Sample Text Entry Field"));
|
||||
gtk_widget_set_usize (widget, 70, -1);
|
||||
gtk_widget_set_size_request (widget, 70, -1);
|
||||
hbox = gtk_hbox_new (FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), widget, TRUE, TRUE, 0);
|
||||
gtk_table_attach (GTK_TABLE (table), hbox, 0, 1, 4, 5, GTK_EXPAND | GTK_FILL, 0, GNOME_PAD_SMALL, GNOME_PAD_SMALL);
|
||||
|
@ -61,26 +62,26 @@ create_form (void)
|
|||
gtk_table_attach (GTK_TABLE (table), menubar, 1, 2, 2, 3, 0, 0, GNOME_PAD_SMALL, GNOME_PAD_SMALL);
|
||||
|
||||
widget = gtk_menu_item_new_with_label(_("Submenu"));
|
||||
gtk_menu_bar_append(GTK_MENU_BAR(menubar), widget);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menubar), widget);
|
||||
|
||||
menu = gtk_menu_new();
|
||||
gtk_menu_item_set_submenu(GTK_MENU_ITEM(widget), menu);
|
||||
widget = gtk_menu_item_new_with_label(_("Item 1"));
|
||||
gtk_menu_append(GTK_MENU(menu), widget);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), widget);
|
||||
widget = gtk_menu_item_new_with_label(_("Another item"));
|
||||
gtk_menu_append(GTK_MENU(menu), widget);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), widget);
|
||||
|
||||
|
||||
widget = gtk_radio_button_new_with_label (NULL, _("Radio Button 1"));
|
||||
hbox = gtk_hbox_new (FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
|
||||
group = gtk_radio_button_group (GTK_RADIO_BUTTON (widget));
|
||||
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (widget));
|
||||
gtk_table_attach (GTK_TABLE (table), hbox, 1, 2, 3, 4, GTK_EXPAND | GTK_FILL, 0, 0, 0);
|
||||
|
||||
widget = gtk_radio_button_new_with_label (group, _("Radio Button 2"));
|
||||
hbox = gtk_hbox_new (FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
|
||||
group = gtk_radio_button_group (GTK_RADIO_BUTTON (widget));
|
||||
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (widget));
|
||||
gtk_table_attach (GTK_TABLE (table), hbox, 1, 2, 4, 5, GTK_EXPAND | GTK_FILL, 0, 0, 0);
|
||||
|
||||
/* column three */
|
||||
|
|
|
@ -82,8 +82,11 @@ themes_list_refresh (void)
|
|||
for (i = 0; themes[i] != NULL; i++)
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
gchar *basename;
|
||||
basename = g_path_get_basename (themes[i]);
|
||||
gtk_list_store_append (model, &iter);
|
||||
gtk_list_store_set (model, &iter, 0, g_basename (themes[i]), -1);
|
||||
gtk_list_store_set (model, &iter, 0, basename, -1);
|
||||
g_free (basename);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -111,7 +114,7 @@ static gchar* get_selected_theme (void)
|
|||
}
|
||||
|
||||
|
||||
static const gchar* get_selected_theme_name (void)
|
||||
static gchar* get_selected_theme_name (void)
|
||||
{
|
||||
int index = -1;
|
||||
GtkTreeView *view = GTK_TREE_VIEW (glade_xml_get_widget (xml, "tree1"));
|
||||
|
@ -121,7 +124,7 @@ static const gchar* get_selected_theme_name (void)
|
|||
if (index == -1)
|
||||
return NULL;
|
||||
|
||||
return g_basename (themes[index]);
|
||||
return g_path_get_basename (themes[index]);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -131,6 +134,7 @@ apply_cb (void)
|
|||
if (name)
|
||||
{
|
||||
gconf_client_set_string (gconf_client_get_default (), "/desktop/gnome/interface/gtk_theme", name, NULL);
|
||||
g_free (name);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -208,7 +212,7 @@ install_cb (GtkButton *b, gpointer data)
|
|||
{
|
||||
GtkFileSelection *sel = GTK_FILE_SELECTION (gtk_file_selection_new (_("Select a theme to install")));
|
||||
g_signal_connect (G_OBJECT (sel->ok_button), "clicked", (GCallback) fsel_ok_cb, sel);
|
||||
gtk_signal_connect_object (GTK_OBJECT (sel->cancel_button), "clicked", (GCallback) gtk_widget_destroy, G_OBJECT (sel));
|
||||
g_signal_connect_swapped (G_OBJECT (sel->cancel_button), "clicked", (GCallback) gtk_widget_destroy, sel);
|
||||
gtk_widget_show_all (GTK_WIDGET (sel));
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2002-02-04 Lauris Kaplinski <lauris@ximian.com>
|
||||
|
||||
* gnome-ui-properties.c (dialog_button_clicked_cb): Use GtkDialog
|
||||
|
||||
2002-02-01 Seth Nickell <snickell@stanford.edu>
|
||||
|
||||
* behavior-capplet.png:
|
||||
|
|
|
@ -66,7 +66,7 @@ toolbar_to_widget (GConfValue *value)
|
|||
|
||||
|
||||
static void
|
||||
dialog_button_clicked_cb (GnomeDialog *dialog, gint response_id, GConfChangeSet *changeset)
|
||||
dialog_button_clicked_cb (GtkDialog *dialog, gint response_id, GConfChangeSet *changeset)
|
||||
{
|
||||
switch (response_id)
|
||||
{
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
2002-02-04 Lauris Kaplinski <lauris@ximian.com>
|
||||
|
||||
* capplet-dir-view-tree.c (populate_tree_branch): Use
|
||||
g_object unref instead of gdk_pixbuf_unref
|
||||
|
||||
* capplet-dir-view-list.c (list_clean): Use g_object_unref
|
||||
(sidebar_arrow_update): g_build_filename
|
||||
(list_create): Replace deprecated methods
|
||||
|
||||
* preferences.c (gnomecc_preferences_class_init): Use g_signal_new
|
||||
(read_preferences): Use g_signal_emit
|
||||
|
||||
* capplet-dir.c (find_icon): Use glib methods instead of
|
||||
deprecated stuff
|
||||
|
||||
2002-01-21 Richard Hestilow <hestilow@ximian.com>
|
||||
|
||||
* main.c: Use nautilus as the shell if it is already running.
|
||||
|
|
|
@ -74,10 +74,10 @@ list_clean (CappletDirView *view)
|
|||
{
|
||||
ListViewData *data = view->view_data;
|
||||
|
||||
gdk_pixbuf_unref (data->header_logo);
|
||||
gdk_pixbuf_unref (data->arrow);
|
||||
gdk_gc_unref (data->gc1);
|
||||
gdk_gc_unref (data->gc2);
|
||||
g_object_unref (G_OBJECT (data->header_logo));
|
||||
g_object_unref (G_OBJECT (data->arrow));
|
||||
g_object_unref (G_OBJECT (data->gc1));
|
||||
g_object_unref (G_OBJECT (data->gc2));
|
||||
|
||||
g_free (data);
|
||||
}
|
||||
|
@ -192,7 +192,7 @@ sidebar_arrow_update (CappletDirView *view)
|
|||
|
||||
if (!data->arrow)
|
||||
{
|
||||
gchar *file = g_concat_dir_and_file (ART_DIR, "active.png");
|
||||
gchar *file = g_build_filename (ART_DIR, "active.png", NULL);
|
||||
data->arrow = gdk_pixbuf_new_from_file (file, NULL);
|
||||
}
|
||||
|
||||
|
@ -267,7 +267,7 @@ sidebar_populate (CappletDirView *view)
|
|||
SIDEBAR_ACTIVE, NULL,
|
||||
-1);
|
||||
|
||||
gdk_pixbuf_unref (buf);
|
||||
g_object_unref (G_OBJECT (buf));
|
||||
}
|
||||
|
||||
g_slist_free_1 (root); /* Just this first node */
|
||||
|
@ -440,9 +440,9 @@ list_create (CappletDirView *view)
|
|||
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
darea = data->header = gtk_drawing_area_new ();
|
||||
gtk_widget_set_usize (darea, 48, 48);
|
||||
gtk_signal_connect (GTK_OBJECT (darea), "expose_event",
|
||||
(GCallback) header_expose_cb, view);
|
||||
gtk_widget_set_size_request (darea, 48, 48);
|
||||
g_signal_connect (G_OBJECT (darea), "expose_event",
|
||||
(GCallback) header_expose_cb, view);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox), darea, FALSE, FALSE, 0);
|
||||
|
||||
|
@ -469,7 +469,7 @@ list_create (CappletDirView *view)
|
|||
g_signal_connect (G_OBJECT (sel), "changed", (GCallback) sidebar_select_cb, view);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_widget_set_usize (sw, 200, -1);
|
||||
gtk_widget_set_size_request (sw, 200, -1);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_NEVER,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
|
@ -486,7 +486,7 @@ list_create (CappletDirView *view)
|
|||
w = gnome_icon_list_new (72, NULL, 0);
|
||||
data->gil = GNOME_ICON_LIST (w);
|
||||
|
||||
title = g_concat_dir_and_file (ART_DIR, "title.png");
|
||||
title = g_build_filename (ART_DIR, "title.png", NULL);
|
||||
data->header_logo = gdk_pixbuf_new_from_file (title, NULL);
|
||||
g_free (title);
|
||||
|
||||
|
@ -506,9 +506,9 @@ list_create (CappletDirView *view)
|
|||
}
|
||||
#endif
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (w), "select-icon",
|
||||
GTK_SIGNAL_FUNC (select_icon_list_cb),
|
||||
view);
|
||||
g_signal_connect (G_OBJECT (w), "select-icon",
|
||||
(GCallback) select_icon_list_cb,
|
||||
view);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (sw), w);
|
||||
gtk_paned_add2 (GTK_PANED (hbox), sw);
|
||||
|
|
|
@ -61,8 +61,8 @@ populate_tree_branch (CappletDir *dir, GtkCTree *ctree, GtkCTreeNode *parent)
|
|||
scaled = gdk_pixbuf_scale_simple (pixbuf, 16, 16,
|
||||
GDK_INTERP_BILINEAR);
|
||||
gdk_pixbuf_render_pixmap_and_mask (scaled, &pixmap, &mask, 128);
|
||||
gdk_pixbuf_unref (pixbuf);
|
||||
gdk_pixbuf_unref (scaled);
|
||||
g_object_unref (G_OBJECT (pixbuf));
|
||||
g_object_unref (G_OBJECT (scaled));
|
||||
|
||||
current = gtk_ctree_insert_node
|
||||
(ctree, parent, NULL,
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <glib.h>
|
||||
#include <bonobo.h>
|
||||
|
||||
|
@ -68,19 +69,19 @@ find_icon (const char *icon, GnomeDesktopItem *dentry)
|
|||
if (icon_file[0] != '/')
|
||||
{
|
||||
gchar *old = icon_file;
|
||||
icon_file = g_concat_dir_and_file (PIXMAPS_DIR, old);
|
||||
icon_file = g_build_filename (PIXMAPS_DIR, old, NULL);
|
||||
g_free (old);
|
||||
}
|
||||
if (!g_file_exists (icon_file) || g_file_test(icon_file, G_FILE_TEST_IS_DIR))
|
||||
if (!g_file_test (icon_file, G_FILE_TEST_EXISTS) || g_file_test(icon_file, G_FILE_TEST_IS_DIR))
|
||||
{
|
||||
const gchar *icon;
|
||||
g_free (icon_file);
|
||||
icon = gnome_desktop_item_get_string (dentry, GNOME_DESKTOP_ITEM_ICON);
|
||||
if (icon)
|
||||
icon_file = gnome_pixmap_file (icon);
|
||||
icon_file = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_PIXMAP, icon, TRUE, NULL);
|
||||
|
||||
if (!icon_file)
|
||||
icon_file = gnome_pixmap_file ("gnome-unknown.png");
|
||||
icon_file = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_PIXMAP, "gnome-unknown.png", TRUE, NULL);
|
||||
}
|
||||
} else {
|
||||
icon_file = gnome_program_locate_file
|
||||
|
@ -89,7 +90,7 @@ find_icon (const char *icon, GnomeDesktopItem *dentry)
|
|||
}
|
||||
|
||||
if (!icon_file) { /* if icon_file still NULL */
|
||||
icon_file = gnome_pixmap_file ("gnome-unknown.png");
|
||||
icon_file = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_PIXMAP, "gnome-unknown.png", TRUE, NULL);
|
||||
}
|
||||
|
||||
return icon_file;
|
||||
|
@ -121,7 +122,7 @@ capplet_new (CappletDir *dir, gchar *desktop_path)
|
|||
GNOME_DESKTOP_ITEM_EXEC);
|
||||
/* Perhaps use poptParseArgvString here */
|
||||
vec = g_strsplit (execstr, " ", 0);
|
||||
if (!(execstr && execstr[0]) || !(vec && (path = gnome_is_program_in_path (vec[0]))))
|
||||
if (!(execstr && execstr[0]) || !(vec && (path = g_find_program_in_path (vec[0]))))
|
||||
{
|
||||
g_strfreev (vec);
|
||||
gnome_desktop_item_unref (dentry);
|
||||
|
@ -317,7 +318,7 @@ static void
|
|||
capplet_dir_shutdown (CappletDir *capplet_dir)
|
||||
{
|
||||
if (capplet_dir->view)
|
||||
gtk_object_unref (GTK_OBJECT (capplet_dir->view));
|
||||
g_object_unref (G_OBJECT (capplet_dir->view));
|
||||
|
||||
g_slist_foreach (capplet_dir->entries, (GFunc) cde_destroy, NULL);
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <gnome.h>
|
||||
#include <glade/glade.h>
|
||||
#include <bonobo.h>
|
||||
|
|
|
@ -95,12 +95,12 @@ gnomecc_preferences_class_init (GnomeCCPreferencesClass *klass)
|
|||
object_class = GTK_OBJECT_CLASS (klass);
|
||||
|
||||
gnomecc_preferences_signals[CHANGED_SIGNAL] =
|
||||
gtk_signal_new ("changed", GTK_RUN_FIRST,
|
||||
GTK_CLASS_TYPE (object_class),
|
||||
GTK_SIGNAL_OFFSET (GnomeCCPreferencesClass,
|
||||
changed),
|
||||
gtk_marshal_NONE__NONE,
|
||||
GTK_TYPE_NONE, 0);
|
||||
g_signal_new ("changed", G_OBJECT_CLASS_TYPE (object_class),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
G_STRUCT_OFFSET (GnomeCCPreferencesClass, changed),
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
#if 0
|
||||
gtk_object_class_add_signals (object_class,
|
||||
gnomecc_preferences_signals,
|
||||
|
@ -111,7 +111,7 @@ gnomecc_preferences_class_init (GnomeCCPreferencesClass *klass)
|
|||
GnomeCCPreferences *
|
||||
gnomecc_preferences_new (void)
|
||||
{
|
||||
return gtk_type_new (gnomecc_preferences_get_type ());
|
||||
return g_object_new (gnomecc_preferences_get_type (), NULL);
|
||||
}
|
||||
|
||||
GnomeCCPreferences *
|
||||
|
@ -222,8 +222,8 @@ read_preferences (GladeXML *prefs_data, GnomeCCPreferences *prefs)
|
|||
|
||||
gnomecc_preferences_save (prefs);
|
||||
|
||||
gtk_signal_emit (GTK_OBJECT (prefs),
|
||||
gnomecc_preferences_signals[CHANGED_SIGNAL]);
|
||||
g_signal_emit (GTK_OBJECT (prefs),
|
||||
gnomecc_preferences_signals[CHANGED_SIGNAL], 0);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -231,7 +231,7 @@ prefs_dialog_ok_cb (GtkWidget *widget, GladeXML *data)
|
|||
{
|
||||
GnomeCCPreferences *prefs;
|
||||
|
||||
prefs = gtk_object_get_data (GTK_OBJECT (data), "prefs_struct");
|
||||
prefs = g_object_get_data (G_OBJECT (data), "prefs_struct");
|
||||
read_preferences (data, prefs);
|
||||
gnome_dialog_close (GNOME_DIALOG (prefs_dialog));
|
||||
prefs_dialog = NULL;
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
2002-02-04 Lauris Kaplinski <lauris@ximian.com>
|
||||
|
||||
* gnome-settings-locate-pointer.c (locate_pointer_expose): Return
|
||||
FALSE on default case, instead of nothing
|
||||
(setup_window): Replace deprecated methods
|
||||
|
||||
* gnome-settings-sound.c (reload_foreach_cb): Replace deprecated
|
||||
methods
|
||||
|
||||
2002-01-13 Seth Nickell <snickell@stanford.edu>
|
||||
|
||||
reviewed by: <delete if not using a buddy>
|
||||
|
|
|
@ -41,7 +41,7 @@ locate_pointer_expose (GtkWidget *widget,
|
|||
size = SMALL_SIZE;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gdk_draw_rectangle (event->window,
|
||||
|
@ -159,8 +159,8 @@ setup_window (void)
|
|||
}
|
||||
|
||||
gdk_window_shape_combine_mask (window, mask, 0, 0);
|
||||
gdk_gc_destroy (gc);
|
||||
gdk_pixmap_unref (mask);
|
||||
g_object_unref (G_OBJECT (gc));
|
||||
g_object_unref (G_OBJECT (mask));
|
||||
gdk_window_show (window);
|
||||
}
|
||||
|
||||
|
|
|
@ -26,13 +26,16 @@
|
|||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <esd.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <gconf/gconf-client.h>
|
||||
#include <libgnome/gnome-sound.h>
|
||||
#include <libgnome/gnome-util.h>
|
||||
#include <libgnome/gnome-exec.h>
|
||||
#include <libgnomeui/gnome-client.h>
|
||||
#include "libsounds/sound-properties.h"
|
||||
#include "gnome-settings-sound.h"
|
||||
|
@ -106,7 +109,7 @@ reload_foreach_cb (SoundEvent *event, gpointer data)
|
|||
file = g_strdup (event->file);
|
||||
if (file[0] != '/')
|
||||
{
|
||||
tmp = gnome_sound_file (file);
|
||||
tmp = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_SOUND, file, TRUE, NULL);
|
||||
g_free (file);
|
||||
file = tmp;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
2002-02-04 Lauris Kaplinski <lauris@ximian.com>
|
||||
|
||||
* applier.c (bg_applier_dispose): Replace deprecated methods
|
||||
(draw_disabled_message): Use gtk_image instead of gtk_pixmap,
|
||||
replace deprecated methods
|
||||
(render_wallpaper): Replace deprecated methods
|
||||
|
||||
2002-01-13 Seth Nickell <snickell@stanford.edu>
|
||||
|
||||
reviewed by: <delete if not using a buddy>
|
||||
|
|
|
@ -21,10 +21,15 @@
|
|||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifdef GDK_DISABLE_DEPRECATED
|
||||
#undef GDK_DISABLE_DEPRECATED
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <gnome.h>
|
||||
#include <gdk/gdk.h>
|
||||
#include <gdk/gdkx.h>
|
||||
|
@ -320,7 +325,7 @@ bg_applier_dispose (GObject *object)
|
|||
g_object_unref (G_OBJECT (bg_applier->p->last_prefs));
|
||||
|
||||
if (bg_applier->p->wallpaper_pixbuf != NULL)
|
||||
gdk_pixbuf_unref (bg_applier->p->wallpaper_pixbuf);
|
||||
g_object_unref (G_OBJECT (bg_applier->p->wallpaper_pixbuf));
|
||||
|
||||
parent_class->dispose (object);
|
||||
}
|
||||
|
@ -374,7 +379,7 @@ bg_applier_apply_prefs (BGApplier *bg_applier,
|
|||
|
||||
if (need_wallpaper_load_p (bg_applier, new_prefs)) {
|
||||
if (bg_applier->p->wallpaper_pixbuf != NULL)
|
||||
gdk_pixbuf_unref (bg_applier->p->wallpaper_pixbuf);
|
||||
g_object_unref (G_OBJECT (bg_applier->p->wallpaper_pixbuf));
|
||||
|
||||
bg_applier->p->wallpaper_pixbuf = NULL;
|
||||
|
||||
|
@ -427,6 +432,7 @@ bg_applier_get_preview_widget (BGApplier *bg_applier)
|
|||
if (bg_applier->p->preview_widget == NULL) {
|
||||
GdkPixmap *pixmap;
|
||||
|
||||
/* fixme: What to do here? gdk does not export root_parent publicly (Lauris) */
|
||||
pixmap = gdk_pixmap_new (GDK_ROOT_PARENT(), 51, 38, -1);
|
||||
bg_applier->p->preview_widget = gtk_image_new_from_pixmap (pixmap, NULL);
|
||||
}
|
||||
|
@ -457,29 +463,35 @@ draw_disabled_message (GtkWidget *widget)
|
|||
printf ("disabled\n");
|
||||
|
||||
g_return_if_fail (widget != NULL);
|
||||
g_return_if_fail (GTK_IS_PIXMAP (widget));
|
||||
g_return_if_fail (GTK_IS_IMAGE (widget));
|
||||
|
||||
w = MONITOR_CONTENTS_WIDTH;
|
||||
h = MONITOR_CONTENTS_HEIGHT;
|
||||
x = MONITOR_CONTENTS_X;
|
||||
y = MONITOR_CONTENTS_Y;
|
||||
|
||||
if (!GTK_WIDGET_REALIZED (widget))
|
||||
if (!GTK_WIDGET_REALIZED (widget)) {
|
||||
gtk_widget_realize (widget);
|
||||
}
|
||||
|
||||
pixmap = GTK_PIXMAP (widget)->pixmap;
|
||||
|
||||
gtk_image_get_pixmap (GTK_IMAGE (widget), &pixmap, NULL);
|
||||
gc = gdk_gc_new (widget->window);
|
||||
|
||||
gdk_color_black (gtk_widget_get_colormap (widget), &color);
|
||||
gdk_gc_set_foreground (gc, &color);
|
||||
color.red = 0x0;
|
||||
color.green = 0x0;
|
||||
color.blue = 0x0;
|
||||
gdk_gc_set_rgb_fg_color (gc, &color);
|
||||
gdk_draw_rectangle (pixmap, gc, TRUE, x, y, w, h);
|
||||
|
||||
layout = gtk_widget_create_pango_layout (widget, disabled_string);
|
||||
pango_layout_get_pixel_extents (layout, &extents, NULL);
|
||||
|
||||
gdk_color_white (gtk_widget_get_colormap (widget), &color);
|
||||
gdk_gc_set_foreground (gc, &color);
|
||||
color.red = 0xffff;
|
||||
color.green = 0xffff;
|
||||
color.blue = 0xffff;
|
||||
gdk_gc_set_rgb_fg_color (gc, &color);
|
||||
|
||||
/* fixme: I do not understand the logic (Lauris) */
|
||||
|
||||
gdk_draw_layout (widget->window,
|
||||
gc,
|
||||
|
@ -518,7 +530,7 @@ run_render_pipeline (BGApplier *bg_applier, const BGPreferences *prefs)
|
|||
render_to_screen (bg_applier, prefs);
|
||||
|
||||
if (bg_applier->p->pixbuf != NULL) {
|
||||
gdk_pixbuf_unref (bg_applier->p->pixbuf);
|
||||
g_object_unref (G_OBJECT (bg_applier->p->pixbuf));
|
||||
bg_applier->p->pixbuf = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -634,7 +646,7 @@ render_wallpaper (BGApplier *bg_applier, const BGPreferences *prefs)
|
|||
GDK_INTERP_BILINEAR);
|
||||
} else {
|
||||
prescaled_pixbuf = bg_applier->p->wallpaper_pixbuf;
|
||||
gdk_pixbuf_ref (prescaled_pixbuf);
|
||||
g_object_ref (G_OBJECT (prescaled_pixbuf));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -663,7 +675,7 @@ render_wallpaper (BGApplier *bg_applier, const BGPreferences *prefs)
|
|||
}
|
||||
|
||||
if (prescaled_pixbuf != NULL)
|
||||
gdk_pixbuf_unref (prescaled_pixbuf);
|
||||
g_object_unref (G_OBJECT (prescaled_pixbuf));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -743,7 +755,7 @@ render_to_screen (BGApplier *bg_applier, const BGPreferences *prefs)
|
|||
else if (bg_applier->p->type == BG_APPLIER_ROOT && !bg_applier->p->pixmap_is_set)
|
||||
set_root_pixmap (NULL);
|
||||
|
||||
gdk_gc_destroy (gc);
|
||||
g_object_unref (G_OBJECT (gc));
|
||||
}
|
||||
|
||||
/* Create a pixmap that will replace the current root pixmap. This function has
|
||||
|
@ -990,7 +1002,7 @@ place_pixbuf (GdkPixbuf *dest_pixbuf,
|
|||
dest_geom->x, dest_geom->y);
|
||||
} else {
|
||||
dest_pixbuf = src_pixbuf;
|
||||
gdk_pixbuf_ref (dest_pixbuf);
|
||||
g_object_ref (G_OBJECT (dest_pixbuf));
|
||||
}
|
||||
|
||||
return dest_pixbuf;
|
||||
|
|
|
@ -321,7 +321,10 @@ read_color_from_string (const gchar *string)
|
|||
rgb = ((color->red >> 8) << 16) ||
|
||||
((color->green >> 8) << 8) ||
|
||||
(color->blue >> 8);
|
||||
#if 0
|
||||
/* fixme: I am not sure, but this can be accomplished otherwise */
|
||||
color->pixel = gdk_rgb_xpixel_from_rgb (rgb);
|
||||
#endif
|
||||
}
|
||||
|
||||
return color;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue