- Use glib wrappers for fopen/stat/chmod/unlink, fixes file operations for win32 where glib uses utf-8 for all file-handling

- win32: remove company name from exe headers as there's no company behind GKrellM
This commit is contained in:
Stefan Gehn 2008-10-28 19:02:04 +00:00
parent 5e176b0ed0
commit 3d405b9970
19 changed files with 82 additions and 122 deletions

View File

@ -24,6 +24,7 @@
#include "log.h"
#include <glib.h>
#include <glib/gstdio.h>
#include <stdio.h>
#include <stdlib.h>

View File

@ -663,7 +663,7 @@ load_config(gchar *path)
//g_print("Trying to load config from file '%s'\n", path);
f = fopen(path, "r");
f = g_fopen(path, "r");
if (!f)
return;
while (fgets(buf, sizeof(buf), f))

View File

@ -669,7 +669,7 @@ update_inet(GkrellmdMonitor *mon, gboolean first_update)
InetData *in;
static gint check_tcp;
if (!first_update && !GK.second_tick)
return;
@ -1008,7 +1008,7 @@ update_net(GkrellmdMonitor *mon, gboolean first_update)
gkrellm_sys_net_check_routes();
}
gkrellm_sys_net_read_data();
if (GK.second_tick && !net_use_routed)
{
for (list = net_list; list; list = list->next)
@ -1031,7 +1031,7 @@ update_net(GkrellmdMonitor *mon, gboolean first_update)
if (net_timer->up_event)
{
snprintf(buf, sizeof(buf), "/var/run/%s.pid", net_timer->name);
if (stat(buf, &st) == 0)
if (g_stat(buf, &st) == 0)
net_timer0 = st.st_mtime;
else
time(&net_timer0);
@ -2184,7 +2184,7 @@ gkrellmd_update_monitors(void)
}
gkrellmd_send_to_client(client, serve_gstring->str);
serve_gstring = g_string_truncate(serve_gstring, 0);
if (GK.minute_tick || !client->served)
send_time(client);
else if (GK.second_tick)

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="gkrellmd.exe" type="win32"/>
<description>GKrellM Daemon</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

View File

@ -20,7 +20,7 @@ BEGIN
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "The GKrellM Developers"
VALUE "CompanyName", ""
VALUE "FileDescription", "GKrellM Daemon"
VALUE "FileVersion", "2.3.2"
VALUE "InternalName", "gkrellmd"
@ -35,10 +35,3 @@ BEGIN
VALUE "Translation", 1033, 1200
END
END
//
// Manifest resources
//
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
1 RT_MANIFEST "win32-manifest.xml"

View File

@ -120,7 +120,7 @@ gkrellm_log_set_filename(const gchar* filename)
if (filename && filename[0] != '\0')
{
// Open the file to log into
s_gkrellm_logfile = fopen(filename, "at");
s_gkrellm_logfile = g_fopen(filename, "at");
// Add our callbacks to logging chain
if (s_gkrellm_logfile)
{

View File

@ -168,9 +168,9 @@ gkrellm_theme_file_exists(char *name, gchar *subdir)
path = g_strdup_printf("%s/%s_%d%s", _GK.theme_path,
name, _GK.theme_alternative, image_type[i]);
#ifdef WIN32
if (stat(path, &st) == 0 && S_ISREG(st.st_mode))
if (g_stat(path, &st) == 0 && S_ISREG(st.st_mode))
#else
if ( stat(path, &st) == 0
if ( g_stat(path, &st) == 0
&& (S_ISREG(st.st_mode) || S_ISLNK(st.st_mode))
)
#endif
@ -188,9 +188,9 @@ gkrellm_theme_file_exists(char *name, gchar *subdir)
path = g_strdup_printf("%s/%s%s", _GK.theme_path, name,
image_type[i]);
#ifdef WIN32
if (stat(path, &st) == 0 && S_ISREG(st.st_mode))
if (g_stat(path, &st) == 0 && S_ISREG(st.st_mode))
#else
if ( stat(path, &st) == 0
if ( g_stat(path, &st) == 0
&& (S_ISREG(st.st_mode) || S_ISLNK(st.st_mode))
)
#endif
@ -2202,7 +2202,7 @@ parse_gkrellmrc(gint alternative)
if (alternative > 0)
snprintf(lbuf, sizeof(lbuf), "_%d", alternative);
path = g_strdup_printf("%s/%s%s", _GK.theme_path, GKRELLMRC, lbuf);
if ((f = fopen(path, "r")) != NULL)
if ((f = g_fopen(path, "r")) != NULL)
{
while (fgets(buf, sizeof(buf), f))
{
@ -2311,7 +2311,7 @@ gkrellm_load_user_config(GkrellmMonitor *mon_only, gboolean monitor_values)
}
config = gkrellm_make_config_file_name(gkrellm_homedir(),
GKRELLM_USER_CONFIG);
f = fopen(config, "r");
f = g_fopen(config, "r");
g_free(config);
if (f)
@ -2432,7 +2432,7 @@ gkrellm_save_user_config(void)
GKRELLM_USER_CONFIG);
config_new = g_strconcat(config, ".new", NULL);
f = fopen(config_new, "w");
f = g_fopen(config_new, "w");
if (f == NULL)
{
g_warning(_("Cannot open config file %s for writing.\n"), config_new);
@ -2467,7 +2467,7 @@ gkrellm_save_user_config(void)
}
if ( !_GK.config_clean
&& (ff = fopen(config, "r")) != NULL
&& (ff = g_fopen(config, "r")) != NULL
)
{
gchar buf[CFG_BUFSIZE], *keyword, *ch, tmp;
@ -2516,9 +2516,9 @@ gkrellm_save_user_config(void)
fclose(f);
#if defined(WIN32)
/* windows rename() does not allow overwriting existing files! */
unlink(config);
g_unlink(config);
#endif
i = rename(config_new, config);
i = g_rename(config_new, config);
if (i != 0)
{
g_warning("Cannot rename new config file %s to %s.\n", config_new, config);
@ -2535,7 +2535,7 @@ gkrellm_save_user_config(void)
#else
mode = 0600;
#endif
chmod(config, mode);
g_chmod(config, mode);
g_free(config);
g_free(config_new);

View File

@ -1354,7 +1354,7 @@ fstab_user_permission(Mount *m)
{
struct stat my_stat;
stat(m->device, &my_stat);
g_stat(m->device, &my_stat);
if ( strstr(m->options, "user")
|| (strstr(m->options, "owner") && my_stat.st_uid == uid)
)

View File

@ -45,6 +45,7 @@
#endif
#include <gtk/gtk.h>
#include <glib/gstdio.h>
#include <stdio.h>
#include <stdlib.h>

View File

@ -1140,7 +1140,7 @@ _("Make gkrellm a topmost window (restart gkrellm for this to take effect)."));
vbox2 = gkrellm_gtk_framed_vbox(vbox1, NULL, 0, FALSE, 0, 0);
gkrellm_gtk_check_button_connected(vbox2, &dock_type_button,
_GK.dock_type, FALSE, FALSE, 0,
cb_dock_type, NULL,
cb_dock_type, NULL,
_("Set window type to be a dock or panel"));
vbox2 = gkrellm_gtk_framed_vbox(vbox1, NULL, 0, FALSE, 0, 0);
@ -1314,7 +1314,7 @@ get_theme_author(gchar *path)
if (!path || *path == '\0')
return buf;
rcfile = g_strdup_printf("%s/%s", path, GKRELLMRC);
f = fopen(rcfile, "r");
f = g_fopen(rcfile, "r");
g_free(rcfile);
if (!f)
return buf;
@ -1570,7 +1570,7 @@ gkrellm_save_theme_config(void)
path = gkrellm_make_config_file_name(gkrellm_homedir(),
GKRELLM_THEME_CONFIG);
if ((f = fopen(path, "w")) != NULL)
if ((f = g_fopen(path, "w")) != NULL)
{
fprintf(f, "%s\n", _GK.theme_path);
fprintf(f, "%d\n", _GK.theme_alternative);
@ -1593,7 +1593,7 @@ gkrellm_load_theme_config(void)
gint i;
/* Need to load the theme from ~/.gkrellm/theme_config only at startup
| or if re-reading because of theme_event - these are only times
| or if re-reading because of theme_event - these are only times
| _GK.theme_path will be NULL. Note: _GK.theme_path will not be NULL
| at startup if there is a command line theme, so no theme scaling if
| using command line theme.
@ -1602,7 +1602,7 @@ gkrellm_load_theme_config(void)
{
path = gkrellm_make_config_file_name(gkrellm_homedir(),
GKRELLM_THEME_CONFIG);
f = fopen(path, "r");
f = g_fopen(path, "r");
g_free(path);
if (f && fgets(buf, sizeof(buf), f))
{
@ -2277,7 +2277,7 @@ create_config_window(void)
GList *list;
GkrellmMonitor *mon;
gchar *config_name, *window_title;
if (config_window)
{
gtk_window_present(GTK_WINDOW(config_window));
@ -2298,7 +2298,7 @@ create_config_window(void)
gtk_window_set_wmclass(GTK_WINDOW(config_window),
"Gkrellm_conf", "Gkrellm");
gtk_container_set_border_width(GTK_CONTAINER(config_window), 2);
config_hbox = gtk_hbox_new(FALSE, 4);
gtk_container_add(GTK_CONTAINER(config_window), config_hbox);

View File

@ -1323,7 +1323,7 @@ gkrellm_inet_save_data(void)
{
in = (InetMon *) list->data;
fname = make_inet_data_fname(in);
if ((f = fopen(fname, "w")) == NULL)
if ((f = g_fopen(fname, "w")) == NULL)
continue;
fputs("minute hour yday width\n", f);
@ -1357,7 +1357,7 @@ gkrellm_inet_load_data(void)
{
in = (InetMon *) list->data;
fname = make_inet_data_fname(in);
if ((f = fopen(fname, "r")) == NULL)
if ((f = g_fopen(fname, "r")) == NULL)
{
gkrellm_reset_chart(in->chart);
draw_inet_chart(in);

View File

@ -115,7 +115,7 @@ GCRY_THREAD_OPTION_PTHREAD_IMPL;
/* Here's the list of all the mailbox types the Mail monitor knows about.
| The MBOX_FETCH is a pseudo internal mailbox where the counts read from
| the fetch program are kept. Additionally MBOX_FETCH_TOOLTIP types
| are constructed just so the fetch programs output lines can be
| are constructed just so the fetch programs output lines can be
| reported in a tooltip. Real mailboxes that GKrellM creates in its
| config and knows how to check have MBOX_INTERNAL set. And
| finally there can be external (plugin) mailboxes created which
@ -390,7 +390,7 @@ update_tooltip(void)
MailAccount *account;
GString *mboxes = NULL;
gchar buf[128];
if (show_tooltip)
{
mboxes = g_string_sized_new(512);
@ -412,10 +412,10 @@ update_tooltip(void)
else if (! format_remote_mbox_name(mbox, buf, sizeof(buf)))
continue; /* Can't get a name, so no tooltip for you! */
if (mboxes->len > 0)
if (mboxes->len > 0)
g_string_append_c(mboxes, '\n');
g_string_append(mboxes, buf);
if (count_mode == MSG_NEW_TOTAL_COUNT)
snprintf(buf, sizeof(buf), "(%d/%d)",
mbox->new_mail_count, mbox->mail_count);
@ -429,7 +429,7 @@ update_tooltip(void)
if (show_tooltip && mboxes && mboxes->len > 0)
{
#if GTK_CHECK_VERSION(2,12,0)
gtk_widget_set_tooltip_text(mail->drawing_area, mboxes->str);
gtk_widget_set_tooltip_text(mail->drawing_area, mboxes->str);
#else
gtk_tooltips_set_tip(tooltip, mail->drawing_area, mboxes->str, "");
gtk_tooltips_enable(tooltip);
@ -447,8 +447,8 @@ update_tooltip(void)
if (mboxes)
g_string_free(mboxes, TRUE);
}
/* Look at a From line to see if it is valid, lines look like:
| From sending_address dayofweek month dayofmonth timeofday year
| eg: From billw@gkrellm.net Fri Oct 22 13:52:49 2010
@ -490,7 +490,7 @@ is_multipart_mail(gchar *buf, gchar *separator)
gchar *fieldstart;
gchar *sepstart;
gint seplen;
if (strncmp(buf, "Content-Type: ", 14) != 0)
return FALSE;
if (strncmp(&buf[14], "multipart/", 10) != 0)
@ -1228,7 +1228,7 @@ check_imap(Mailbox *mbox)
return tcp_shutdown(&conn, mbox, tcp_error_message[4], FALSE);
if ((ss = strstr(mbox->tcp_in->str, "MESSAGES")) == NULL)
return tcp_shutdown(&conn, mbox, tcp_error_message[4], FALSE);
}
}
else
return tcp_shutdown(&conn, mbox, tcp_error_message[4], FALSE);
}
@ -1263,7 +1263,7 @@ mh_sequences_new_count(Mailbox *mbox)
path = g_strconcat(mbox->account->path, G_DIR_SEPARATOR_S,
".mh_sequences", NULL);
f = fopen(path, "r");
f = g_fopen(path, "r");
g_free(path);
if (!f)
return FALSE;
@ -1315,7 +1315,7 @@ sylpheed_mark_new_count(Mailbox *mbox)
for (fname = mark_file_names; *fname; fname++) {
path = g_strconcat(mbox->account->path, G_DIR_SEPARATOR_S,
*fname, NULL);
f = fopen(path, "rb");
f = g_fopen(path, "rb");
g_free(path);
if (f)
break;
@ -1323,7 +1323,7 @@ sylpheed_mark_new_count(Mailbox *mbox)
if (!f)
return FALSE;
if ( fread(&ver, sizeof(ver), 1, f) == 1
&& SYLPHEED_MARK_VERSION == ver
)
@ -1448,12 +1448,12 @@ check_maildir(Mailbox *mbox)
| And Netscape mail does status with X-Mozilla-Status: xxxS
| where S is bitwise or of status flags:
| 1: read 2: replied 4: marked 8: deleted
|
|
| Evolution uses status with X-Evolution: 00000000-xxxx where xxxx status is
| a bitfield in hexadecimal (see enum _CamelMessageFlags in evolution/camel
| source) and most importantly CAMEL_MESSAGE_SEEN = 1<<4.
*/
/* test if buf is a status for standard mail, mozilla or evolution
/* test if buf is a status for standard mail, mozilla or evolution
*/
static gboolean
is_status(gchar *buf)
@ -1505,7 +1505,7 @@ status_is_old(gchar *buf)
return FALSE;
}
/* test if a mail is marked as deleted
/* test if a mail is marked as deleted
| Evolution uses status with X-Evolution: 00000000-xxxx where xxxx status is
| a bitfield in hexadecimal (see enum _CamelMessageFlags in evolution/camel source)
| and most importantly CAMEL_MESSAGE_DELETED = 1<<1.
@ -1551,7 +1551,7 @@ check_mbox(Mailbox *mbox)
gint is_multipart = FALSE;
gint content_len = 0;
if (stat(mbox->account->path, &s) != 0)
if (g_stat(mbox->account->path, &s) != 0)
{
mbox->mail_count = mbox->old_mail_count = mbox->new_mail_count = 0;
mbox->last_mtime = 0;
@ -1589,7 +1589,7 @@ check_mbox(Mailbox *mbox)
|| force_mail_check
)
{
if ((f = fopen(mbox->account->path, "r")) == NULL)
if ((f = g_fopen(mbox->account->path, "r")) == NULL)
{
if (_GK.debug_level & DEBUG_MAIL)
printf("check_mbox can't fopen(%s): %s\n", mbox->account->path,
@ -1751,7 +1751,7 @@ draw_mail_text_decal(gint new_mail_count, gint mail_count)
strcpy(tbuf, "-");
else
snprintf(tbuf, sizeof(tbuf), "%d", mail_count);
snprintf(buf, sizeof(buf), "%s/%s", nbuf, tbuf);
snprintf(buf, sizeof(buf), "%s/%s", nbuf, tbuf);
}
}
w = gkrellm_gdk_string_width(ts.font, buf);
@ -2249,7 +2249,7 @@ update_mail(void)
if (GK.second_tick && (++second_count % local_check_timeout) == 0)
local_check = TRUE;
fetch_check = fetch_check_is_local ? local_check : remote_check;
if (remote_check || local_check)
mua_is_launched(); /* update pipe, avoid lingering zombie */
@ -2283,7 +2283,7 @@ update_mail(void)
if (fetch_check)
(*mbox->check_func)(mbox);
break;
case MBOX_CHECK_INLINE: /* Local mailbox or maildir check */
if (local_check)
{
@ -2525,7 +2525,7 @@ cb_panel_press(GtkWidget *widget, GdkEventButton *ev)
if (ev->button == 1 && ev->x >= d->x && ev->x < d->x + d->w)
force_mail_check = TRUE;
return FALSE;
}
}
static void
dup_account(MailAccount *dst, MailAccount *src)
@ -3361,7 +3361,7 @@ cb_tree_selection_changed(GtkTreeSelection *selection, gpointer data)
active = (account->port == default_port) ? FALSE : TRUE;
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(port_button), active);
sprintf(buf, "%d", account->port);
gtk_entry_set_text(GTK_ENTRY(port_entry), buf);
gtk_entry_set_text(GTK_ENTRY(port_entry), buf);
}
else if (local_supported)
{
@ -3950,7 +3950,7 @@ create_mail_tab(GtkWidget *tab_vbox)
gtk_box_pack_start(GTK_BOX(hbox), mbox_path_entry, TRUE, TRUE, 2);
gtk_entry_set_text(GTK_ENTRY(mbox_path_entry), "");
g_signal_connect (G_OBJECT (mbox_path_entry), "activate",
G_CALLBACK(mailbox_enter_cb), NULL);
G_CALLBACK(mailbox_enter_cb), NULL);
}
/* Remote mailbox account entry */
@ -4200,7 +4200,7 @@ create_mail_tab(GtkWidget *tab_vbox)
mh_seq_ignore, TRUE, TRUE, 0,
multi_toggle_button_cb, NULL,
_("Ignore .mh_sequences when checking MH mail."));
/* --Info tab */
vbox = gkrellm_gtk_framed_notebook_page(tabs, _("Info"));
text = gkrellm_gtk_scrolled_text_view(vbox, NULL,

View File

@ -279,7 +279,7 @@ set_or_save_position(gint save)
}
if ( !_GK.no_config
&& (_GK.x_position != x_last || _GK.y_position != y_last)
&& (f = fopen(path, "w")) != NULL
&& (f = g_fopen(path, "w")) != NULL
)
{
x_last = _GK.x_position;
@ -292,7 +292,7 @@ set_or_save_position(gint save)
}
else if (!_GK.withdrawn) /* In slit conflicts with setting position */
{
if ((f = fopen(path, "r")) != NULL)
if ((f = g_fopen(path, "r")) != NULL)
{
x = y = 0;
fscanf(f, "%d %d", &x, &y);

View File

@ -781,7 +781,7 @@ get_connect_state(void)
{
snprintf(buf, sizeof(buf),
"%s/%s", lock_directory, PPP_LOCK_FILE);
if (stat(buf, &st) == 0)
if (g_stat(buf, &st) == 0)
state = TB_STANDBY;
else
{
@ -790,7 +790,7 @@ get_connect_state(void)
*/
snprintf(buf, sizeof(buf), "%s/%s/%s",
gkrellm_homedir(), GKRELLM_DIR, PPP_LOCK_FILE);
if (stat(buf, &st) == 0)
if (g_stat(buf, &st) == 0)
state = TB_STANDBY;
}
}
@ -821,7 +821,7 @@ get_connect_time(void)
break;
case TIMER_TYPE_PPP:
snprintf(buf, sizeof(buf), "/var/run/%s.pid", timer_button_iface);
if (stat(buf, &st) == 0)
if (g_stat(buf, &st) == 0)
t = st.st_mtime;
break;
case TIMER_TYPE_IPPP:
@ -917,7 +917,7 @@ stale_pppd_files_debug(void)
gchar buf[256];
snprintf(buf, sizeof(buf), "/var/run/%s.pid", timer_button_iface);
if (stat(buf, &st) == 0 && !net_timed->up)
if (g_stat(buf, &st) == 0 && !net_timed->up)
g_print(_(" **** Stale pppd pppX.pid file detected!\n"));
}
@ -1672,7 +1672,7 @@ gkrellm_net_save_data(void)
continue;
snprintf(fname, sizeof(fname), "%s%c%s", net_data_dir,
G_DIR_SEPARATOR, net->name);
if ((f = fopen(fname, "w")) == NULL)
if ((f = g_fopen(fname, "w")) == NULL)
continue;
fprintf(f, "%d\n", NET_DATA_VERSION);
fputs("wday mday month yday year\n", f);
@ -1822,7 +1822,7 @@ load_net_data(void)
net = (NetMon *) list->data;
snprintf(fname, sizeof(fname), "%s%c%s", net_data_dir,
G_DIR_SEPARATOR, net->name);
if ((f = fopen(fname, "r")) == NULL)
if ((f = g_fopen(fname, "r")) == NULL)
continue;
fgets(buf, sizeof(buf), f);
if (sscanf(buf, "%d\n", &version) != 1)

View File

@ -1050,7 +1050,7 @@ load_plugins_placement_file(void)
gkrellm_free_glist_and_data(&plugins_place_list);
path = gkrellm_make_config_file_name(gkrellm_homedir(),
PLUGIN_PLACEMENT_FILE);
if ((f = fopen(path, "r")) != NULL)
if ((f = g_fopen(path, "r")) != NULL)
{
while ((fgets(buf, sizeof(buf), f)) != NULL)
{
@ -1072,12 +1072,12 @@ save_plugins_placement_file(void)
GkrellmMonitor *builtin, *plugin;
GkrellmMonprivate *mp;
gchar *path;
if (!plugin_placement_modified || _GK.demo || _GK.no_config)
return;
path = gkrellm_make_config_file_name(gkrellm_homedir(),
PLUGIN_PLACEMENT_FILE);
if ((f = fopen(path, "w")) != NULL)
if ((f = g_fopen(path, "w")) != NULL)
{
for (list = plugins_list; list; list = list->next)
{
@ -1111,7 +1111,7 @@ load_plugins_enable_file(void)
gkrellm_free_glist_and_data(&plugins_enable_list);
path = gkrellm_make_config_file_name(gkrellm_homedir(),PLUGIN_ENABLE_FILE);
if ((f = fopen(path, "r")) != NULL)
if ((f = g_fopen(path, "r")) != NULL)
{
while ((fgets(buf, sizeof(buf), f)) != NULL)
{
@ -1134,12 +1134,12 @@ save_plugins_enable_file(void)
GList *list;
GkrellmMonitor *m;
gchar *path, *s;
if (!plugin_enable_list_modified || _GK.demo)
return;
path = gkrellm_make_config_file_name(gkrellm_homedir(),
PLUGIN_ENABLE_FILE);
if ((f = fopen(path, "w")) != NULL)
if ((f = g_fopen(path, "w")) != NULL)
{
for (list = plugins_list; list; list = list->next)
{
@ -1177,7 +1177,7 @@ scan_for_plugins(gchar *path)
GkrellmMonitor *m = NULL;
gchar *s;
gboolean exists;
if (!path || !*path || (dir = g_dir_open(path, 0, NULL)) == NULL)
return;
while ((name = (gchar *) g_dir_read_name(dir)) != NULL)

View File

@ -375,7 +375,7 @@ gkrellm_sensor_draw_temperature_decal(GkrellmPanel *p, GkrellmDecal *d,
w = gkrellm_gdk_string_width(d->text_style.font, buf)
+ d->text_style.effect;
}
d->x_off = d->w - w;
if (d->x_off < 0)
d->x_off = 0;
@ -778,7 +778,7 @@ gkrellm_sensors_interface_remove(gint _interface)
}
}
}
while (removed_one);
while (removed_one);
}
static void
@ -1036,7 +1036,7 @@ layout_volt_decals(GkrellmPanel *p, GkrellmStyle *style)
cols = n;;
volt_mon_width = w / cols; /* spread them out */
x = (w - cols * volt_mon_width) / 2 + m->left;
gkrellm_get_top_bottom_margins(style, &y, NULL);
c = 0;
for (list = volt_list; list; list = list->next)
@ -1473,7 +1473,7 @@ make_volt_panel(GtkWidget *vbox, gint first_create)
style = gkrellm_meter_style(style_id);
make_volt_decals(pVolt, style);
layout_volt_decals(pVolt, style);
gkrellm_panel_configure(pVolt, NULL, style);
/* Make the bottom margin reference against the bottom volt decals
@ -1587,7 +1587,7 @@ create_sensors(GtkWidget *vbox, gint first_create)
| THEME_DIR/sensors/bg_volt.png
| and for a border for it from the gkrellmrc in the format:
| set_piximage_border sensors_bg_volt l,r,t,b
| There is no default for bg_volt image, ie it may end up being NULL.
| There is no default for bg_volt image, ie it may end up being NULL.
*/
xpm = gkrellm_using_default_theme() ? bg_volt_xpm : NULL;
if (bezel_piximage)
@ -1724,7 +1724,7 @@ save_sensors_config(FILE *f_not_used)
return;
sprintf(buf, "%s/%s", GKRELLM_DIR, SENSOR_CONFIG_FILE);
config = gkrellm_make_config_file_name(gkrellm_homedir(), buf);
f = fopen(config, "w");
f = g_fopen(config, "w");
g_free(config);
if (!f)
return;
@ -1901,14 +1901,14 @@ read_sensors_config(void)
sprintf(buf, "%s/%s", GKRELLM_DIR, SENSOR_CONFIG_FILE);
config = gkrellm_make_config_file_name(gkrellm_homedir(), buf);
f = fopen(config, "r");
f = g_fopen(config, "r");
g_free(config);
if (!f)
{
sprintf(buf, "%s/%s", GKRELLM_DIR, SENSOR_2_1_14_CONFIG_FILE);
config = gkrellm_make_config_file_name(gkrellm_homedir(), buf);
f = fopen(config, "r");
f = g_fopen(config, "r");
g_free(config);
}
if (f)
@ -2526,7 +2526,7 @@ enable_cb(GtkCellRendererText *cell, gchar *path_string, gpointer data)
-1);
s->enabled = !enabled;
gtk_tree_store_set(GTK_TREE_STORE(model), &iter,
ENABLE_COLUMN, s->enabled,
ENABLE_COLUMN, s->enabled,
-1);
change_row_reference(model, path);
gtk_tree_path_free(path);
@ -2655,7 +2655,7 @@ static gchar *sensor_info_text0[] =
"\n",
};
static gchar *sensor_info_text1[] =
static gchar *sensor_info_text1[] =
{
N_("<h>Setup\n"),
N_("Enter data scaling factors and offsets for the sensors if the default\n"

View File

@ -216,7 +216,7 @@ gkrellm_homedir(void)
homedir = (gchar *) g_get_home_dir();
if (!homedir)
homedir = ".";
homedir = "."; // FIXME: This does not look right to me (stefan)
return homedir;
}
@ -229,11 +229,7 @@ gkrellm_make_home_subdir(gchar *subdir, gchar **path)
dir = g_build_path(G_DIR_SEPARATOR_S, gkrellm_homedir(), subdir, NULL);
if (!g_file_test(dir, G_FILE_TEST_IS_DIR))
{
#ifdef WIN32
if (mkdir(dir) < 0)
#else
if (mkdir(dir, 0755) < 0)
#endif
if (g_mkdir(dir, 0755) < 0)
printf(_("Cannot create directory: %s\n"), dir);
else
result = TRUE;

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="gkrellm.exe" type="win32"/>
<description>GKrellM</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

View File

@ -27,7 +27,7 @@ BEGIN
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "The GKrellM Developers"
VALUE "CompanyName", ""
VALUE "FileDescription", "GKrellM"
VALUE "FileVersion", "2.3.2"
VALUE "InternalName", "gkrellm"
@ -42,10 +42,3 @@ BEGIN
VALUE "Translation", 1033, 1200
END
END
//
// Manifest resources
//
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
1 RT_MANIFEST "win32-manifest.xml"