Browse Source

* Fix a bunch of compiler warnings.

* Remove deprecated gtk_type_class.
* Fix icon update hook in launcher, this is bothering me for a long time.
* Install settings desktop file in $(datadir)/xfce4/settings-dialogs too.
* Fix german typo: Bug 4066.
* Fix dnd to launcher: Bug 3958.


(Old svn revision: 27412)
upstream/xfce4-panel-4.10.1
Nick Schermer 15 years ago
parent
commit
49b0c7b032
  1. 9
      ChangeLog
  2. 58
      libxfce4panel/xfce-hvbox.c
  3. 4
      mcs-plugin/Makefile.am
  4. 29
      panel/panel-app.c
  5. 4
      panel/panel-app.h
  6. 8
      panel/panel-config.c
  7. 19
      panel/panel-dialogs.c
  8. 2
      panel/panel-item-manager.c
  9. 4
      panel/panel-properties.c
  10. 4
      panel/panel.c
  11. 4
      plugins/clock/clock-dialog.c
  12. 2
      plugins/launcher/launcher-dialog.c
  13. 29
      plugins/launcher/launcher.c
  14. 3
      plugins/launcher/launcher.h
  15. 2
      po/de.po

9
ChangeLog

@ -1,3 +1,12 @@
2008-08-01 00:00 nick
* Fix a bunch of compiler warnings.
* Remove deprecated gtk_type_class.
* Fix icon update hook in launcher, this is bothering me for a long time.
* Install settings desktop file in $(datadir)/xfce4/settings-dialogs too.
* Fix german typo: Bug 4066.
* Fix dnd to launcher: Bug 3958.
2008-07-15 13:04 jannis
* autogen.sh: Change @REVISION@ substitution for git svn repositories

58
libxfce4panel/xfce-hvbox.c

@ -76,26 +76,22 @@ xfce_hvbox_class_init (XfceHVBoxClass *klass)
static GtkWidgetClass *
get_class (XfceHVBox *hvbox)
static gpointer
xfce_hvbox_get_class (XfceHVBox *hvbox)
{
GtkWidgetClass *klass;
switch (hvbox->orientation)
{
case GTK_ORIENTATION_HORIZONTAL:
klass = GTK_WIDGET_CLASS (gtk_type_class (GTK_TYPE_HBOX));
break;
case GTK_ORIENTATION_VERTICAL:
klass = GTK_WIDGET_CLASS (gtk_type_class (GTK_TYPE_VBOX));
break;
default:
g_assert_not_reached ();
klass = NULL;
break;
}
return klass;
GType type;
gpointer klass;
if (hvbox->orientation == GTK_ORIENTATION_HORIZONTAL)
type = GTK_TYPE_HBOX;
else
type = GTK_TYPE_VBOX;
/* peek the class, this only works if the class already exists */
klass = g_type_class_peek (type);
/* return the type or create the class */
return klass ? klass : g_type_class_ref (type);
}
@ -104,14 +100,13 @@ static void
xfce_hvbox_size_request (GtkWidget *widget,
GtkRequisition *requisition)
{
GtkWidgetClass *klass;
XfceHVBox *hvbox;
gpointer klass;
hvbox = XFCE_HVBOX (widget);
klass = get_class (hvbox);
klass->size_request (widget, requisition);
/* get the widget class */
klass = xfce_hvbox_get_class (XFCE_HVBOX (widget));
/* request the size */
(*GTK_WIDGET_CLASS (klass)->size_request) (widget, requisition);
}
@ -120,14 +115,13 @@ static void
xfce_hvbox_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
GtkWidgetClass *klass;
XfceHVBox *hvbox;
hvbox = XFCE_HVBOX (widget);
gpointer klass;
klass = get_class (hvbox);
/* get the widget class */
klass = xfce_hvbox_get_class (XFCE_HVBOX (widget));
klass->size_allocate (widget, allocation);
/* allocate the size */
(*GTK_WIDGET_CLASS (klass)->size_allocate) (widget, allocation);
}

4
mcs-plugin/Makefile.am

@ -45,6 +45,10 @@ desktop_in_files = \
xfce4-panel-manager.desktop.in
desktop_DATA = \
$(desktop_in_files:.desktop.in=.desktop)
settingsdir = $(datadir)/xfce4/settings-dialogs
settings_DATA = $(desktop_DATA)
@INTLTOOL_DESKTOP_RULE@
CLEANFILES = \

29
panel/panel-app.c

@ -145,7 +145,7 @@ static gint signal_pipe[2];
static void
cleanup_panels (void)
{
gint i;
guint i;
GList *l;
Panel *panel;
XfceMonitor *xmon;
@ -420,7 +420,7 @@ session_die (gpointer client_data)
static void
monitor_size_changed (GdkScreen *screen)
{
gint i;
guint i;
XfceMonitor *monitor;
GtkWidget *panel;
@ -453,6 +453,7 @@ create_monitor_list (void)
gint n_screens;
gint n_monitors = 0;
gint i, j;
guint k, m;
gint w = 0, h = 0;
gboolean equal_w, equal_h;
XfceMonitor *mon1, *mon2;
@ -516,16 +517,16 @@ create_monitor_list (void)
}
/* check layout */
for (i = 0; i < panel_app.monitor_list->len; ++i)
for (k = 0; k < panel_app.monitor_list->len; ++k)
{
mon1 = g_ptr_array_index (panel_app.monitor_list, i);
mon1 = g_ptr_array_index (panel_app.monitor_list, k);
for (j = 0; j < panel_app.monitor_list->len; ++j)
for (m = 0; m < panel_app.monitor_list->len; ++m)
{
if (j == i)
if (m == k)
continue;
mon2 = g_ptr_array_index (panel_app.monitor_list, j);
mon2 = g_ptr_array_index (panel_app.monitor_list, m);
if (mon2->geometry.x < mon1->geometry.x
&& mon2->geometry.y < mon1->geometry.y + mon1->geometry.height
@ -878,7 +879,7 @@ void
panel_app_remove_panel (GtkWidget *panel)
{
gint response = GTK_RESPONSE_NONE;
gint n;
guint n;
gchar *first;
if (!xfce_allow_panel_customization())
@ -985,13 +986,13 @@ panel_app_get_ipc_window (void)
}
XfceMonitor *
panel_app_get_monitor (gint n)
panel_app_get_monitor (guint n)
{
return g_ptr_array_index (panel_app.monitor_list,
CLAMP (n, 0, panel_app.monitor_list->len - 1));
MIN (n, panel_app.monitor_list->len - 1));
}
gint
guint
panel_app_get_n_monitors (void)
{
return panel_app.monitor_list->len;
@ -1013,7 +1014,7 @@ panel_app_register_dialog (GtkWidget *dialog)
void
panel_app_set_current_panel (gpointer *panel)
{
gint i;
guint i;
panel_app.current_panel = 0;
@ -1032,13 +1033,13 @@ panel_app_set_current_panel (gpointer *panel)
void
panel_app_unset_current_panel (gpointer *panel)
{
gint i;
guint i;
for (i = 0; i < panel_app.panel_list->len; ++i)
{
if (g_ptr_array_index (panel_app.panel_list, i) == panel)
{
if (i == panel_app.current_panel)
if (i == (guint) panel_app.current_panel)
panel_app.current_panel = 0;
break;
}

4
panel/panel-app.h

@ -100,9 +100,9 @@ void panel_app_about (GtkWidget *panel);
Window panel_app_get_ipc_window (void);
XfceMonitor *panel_app_get_monitor (int n);
XfceMonitor *panel_app_get_monitor (guint n);
int panel_app_get_n_monitors (void);
guint panel_app_get_n_monitors (void);
gboolean panel_app_monitors_equal_height (void);

8
panel/panel-config.c

@ -157,7 +157,7 @@ panel_config_save_panels (GPtrArray * panels)
{
gchar *file;
gboolean failed = FALSE;
gint i;
guint i;
const gchar *path = "xfce4" G_DIR_SEPARATOR_S
"panel" G_DIR_SEPARATOR_S
"panels.xml";
@ -623,9 +623,9 @@ gboolean
config_save_to_file (GPtrArray *array,
const gchar *filename)
{
FILE *fp;
gchar tmp_path[PATH_MAX];
gint i;
FILE *fp;
gchar tmp_path[PATH_MAX];
guint i;
g_return_val_if_fail (array != NULL, FALSE);
g_return_val_if_fail (filename != NULL || (strlen (filename) > 0), FALSE);

19
panel/panel-dialogs.c

@ -430,7 +430,7 @@ add_item_treeview (PanelItemsDialog *pid)
GtkTreeModel *model;
GtkTreePath *path;
GtkTreeIter iter;
gint i;
guint i;
GdkColor *color;
GtkRequisition req;
@ -701,7 +701,7 @@ static void
update_widgets (PanelManagerDialog *pmd)
{
PanelPrivate *priv = PANEL_GET_PRIVATE (pmd->panel);
gint i;
guint i;
GtkToggleButton *tb;
XfceHandleStyle style;
@ -714,7 +714,7 @@ update_widgets (PanelManagerDialog *pmd)
{
tb = g_ptr_array_index (pmd->monitors, i);
gtk_toggle_button_set_active (tb, i == priv->monitor);
gtk_toggle_button_set_active (tb, i == (guint) priv->monitor);
}
}
@ -746,7 +746,7 @@ update_widgets (PanelManagerDialog *pmd)
{
gtk_toggle_button_set_active (
GTK_TOGGLE_BUTTON (pmd->screen_position[i]),
(gint) priv->screen_position == i+1);
priv->screen_position == i + 1);
}
gtk_combo_box_set_active (GTK_COMBO_BOX (pmd->fullwidth),
@ -1222,7 +1222,7 @@ monitor_pressed (GtkToggleButton *tb,
GdkEvent *ev,
PanelManagerDialog *pmd)
{
gint i;
guint i;
GtkToggleButton *mon;
if (ev->type == GDK_KEY_PRESS &&
@ -1527,7 +1527,8 @@ add_panel (GtkWidget *w,
PanelManagerDialog *pmd)
{
gchar name[20];
gint n, x, y;
guint n;
gint x, y;
n = pmd->panels->len;
@ -1558,8 +1559,8 @@ static void
remove_panel (GtkWidget *w,
PanelManagerDialog *pmd)
{
gint n = pmd->panels->len;
gint i;
guint n = pmd->panels->len;
guint i;
gchar name[20];
panel_app_remove_panel (GTK_WIDGET (pmd->panel));
@ -1586,7 +1587,7 @@ static GtkWidget *
create_panel_selector (PanelManagerDialog *pmd)
{
GtkWidget *hbox, *img;
gint i;
guint i;
gchar name[20];
hbox = gtk_hbox_new (FALSE, BORDER);

2
panel/panel-item-manager.c

@ -525,7 +525,7 @@ xfce_panel_item_manager_get_item_info_list (void)
void
xfce_panel_item_manager_free_item_info_list (GPtrArray *info_list)
{
gint i;
guint i;
for (i = 0; i < info_list->len; ++i)
{

4
panel/panel-properties.c

@ -1194,9 +1194,9 @@ panel_set_full_width (Panel *panel,
priv = panel->priv;
if (fullwidth != priv->full_width)
if ((XfcePanelWidthType) fullwidth != priv->full_width)
{
priv->full_width = fullwidth;
priv->full_width = (XfcePanelWidthType) fullwidth;
if (GTK_WIDGET_VISIBLE (panel))
{

4
panel/panel.c

@ -778,7 +778,7 @@ _item_start_move_end (GtkWidget *item,
if (!priv->edit_mode)
{
const GPtrArray *panels = panel_app_get_panel_list ();
gint i;
guint i;
for (i = 0; i < panels->len; ++i)
{
@ -802,7 +802,7 @@ _item_start_move (GtkWidget *item,
const GPtrArray *panels = panel_app_get_panel_list ();
PanelPrivate *priv;
Panel *p;
gint i;
guint i;
for (i = 0; i < panels->len; ++i)
{

4
plugins/clock/clock-dialog.c

@ -139,7 +139,7 @@ xfce_clock_dialog_tooltip_format_changed (GtkComboBox *combo,
entry = g_object_get_data (G_OBJECT (combo), I_("entry"));
/* set one of the default formats */
if (index < G_N_ELEMENTS (tooltip_formats))
if (index < (gint) G_N_ELEMENTS (tooltip_formats))
{
/* hide the entry */
gtk_widget_hide (entry);
@ -260,7 +260,7 @@ xfce_clock_dialog_digital_format_changed (GtkComboBox *combo,
entry = g_object_get_data (G_OBJECT (combo), I_("entry"));
/* set one of the default formats */
if (index < G_N_ELEMENTS (digital_formats))
if (index < (gint) G_N_ELEMENTS (digital_formats))
{
/* hide the entry */
gtk_widget_hide (entry);

2
plugins/launcher/launcher-dialog.c

@ -1061,7 +1061,7 @@ launcher_dialog_tree_button_clicked (GtkWidget *button,
list_length = g_list_length (ld->launcher->entries);
/* select previous item, if last item was removed */
if (position >= list_length)
if (position >= (guint) list_length)
gtk_tree_path_prev (path);
/* select the new item (also updates treeview buttons) */

29
plugins/launcher/launcher.c

@ -111,10 +111,6 @@ launcher_utility_icon_theme_changed (GSignalInvocationHint *ihint,
const GValue *param_values,
LauncherPlugin *launcher)
{
/* only update if we already have an image, this fails when the signal is connected */
if (G_LIKELY (gtk_image_get_storage_type (GTK_IMAGE (launcher->image)) == GTK_IMAGE_EMPTY))
return TRUE;
/* update the button icon */
launcher_icon_button_set_icon (launcher);
@ -133,21 +129,38 @@ launcher_utility_filenames_from_selection_data (GtkSelectionData *selection_data
gchar **uri_list;
GSList *filenames = NULL;
gchar *filename;
gboolean is_uri = TRUE;
guint i;
/* check whether the retrieval worked */
if (G_LIKELY (selection_data->length > 0))
{
/* split the received uri list */
uri_list = g_uri_list_extract_uris ((gchar *) selection_data->data);
if (g_str_equal(gdk_atom_name(selection_data->target), "text/uri-list"))
{
/* split the received uri list */
uri_list = g_uri_list_extract_uris ((gchar *) selection_data->data);
}
else
{
/* split input by \n, \r or \r\n, this might result in empty elements, we sort
* them out below */
uri_list = g_strsplit_set ((gchar *) selection_data->data, "\n\r", 0);
is_uri = FALSE;
}
if (G_LIKELY (uri_list))
{
/* walk though the list */
/* walk through the list */
for (i = 0; uri_list[i] != NULL; i++)
{
if (! uri_list[i][0]) /* skip emtpy elements */
continue;
/* convert the uri to a filename */
filename = g_filename_from_uri (uri_list[i], NULL, NULL);
if (is_uri)
filename = g_filename_from_uri (uri_list[i], NULL, NULL);
else
filename = g_strdup (uri_list[i]);
/* prepend the filename */
if (G_LIKELY (filename))

3
plugins/launcher/launcher.h

@ -105,6 +105,9 @@ enum
static const GtkTargetEntry drop_targets[] =
{
{ "text/uri-list", 0, 0, },
{ "STRING", 0, 0 },
{ "UTF8_STRING", 0, 0 },
{ "text/plain", 0, 0 },
};

2
po/de.po

@ -811,7 +811,7 @@ msgstr "Arbeitsfläche anzeigen/verstecken"
#: ../plugins/systray/systray.desktop.in.in.h:1
msgid "Show notification icons"
msgstr "Symbole für Benchrichtigungen anzeigen"
msgstr "Symbole für Benachrichtigung anzeigen"
#: ../plugins/tasklist/tasklist.desktop.in.in.h:1
msgid "Show all running applications"

Loading…
Cancel
Save